Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8e22a03c authored by Thierry Martinez's avatar Thierry Martinez
Browse files

bootstrapped repository for commit d90ecf49

parent 005d9b92
Branches
Tags 4.0.0
No related merge requests found
Pipeline #340458 failed
......@@ -106,9 +106,12 @@ which declares the algebraic data types that represent the AST.
The documentation of most of the nodes contains examples that can be used as references
for how syntactic constructions are parsed, and that are extracted with [ocamlcodoc][20]
and serve as unit tests with `dune runtest` (or, equivalently, `make tests`).
Moreover, the git branch [`norms`] contains the AST corresponding to the examples
automatically extracted from C++14 and C++17 norms.
[19]: https://memcad.gitlabpages.inria.fr/clangml/doc/clangml/Clang__ast/index.html
[20]: https://gitlab.inria.fr/memcad/ocamlcodoc
[`norms`]: https://gitlab.inria.fr/memcad/clangml/tree/norms/norms
Modules [`Clang.Type`][7], [`Clang.Expr`][8], [`Clang.Stmt`][9],
[`Clang.Decl`][10] and [`Clang.Enum_constant`][11] provides sub-modules
......
......@@ -198,10 +198,10 @@ module Ast = struct
Some (NestedIdentifier ident)
| Namespace ->
let decl = ext_nested_name_specifier_get_as_namespace name in
Some (Namespace (get_cursor_spelling decl))
Some (NamespaceName (get_cursor_spelling decl))
| NamespaceAlias ->
let decl = ext_nested_name_specifier_get_as_namespace name in
Some (NamespaceAlias (get_cursor_spelling decl))
Some (NamespaceAliasName (get_cursor_spelling decl))
| TypeSpec ->
let ty = ext_nested_name_specifier_get_as_type name in
Some (TypeSpec (ty |> of_cxtype))
......
......@@ -683,8 +683,8 @@ and nested_name_specifier = nested_name_specifier_component list
and nested_name_specifier_component =
| Global
| NestedIdentifier of string
| Namespace of string
| NamespaceAlias of string
| NamespaceName of string
| NamespaceAliasName of string
| TypeSpec of qual_type
| TypeSpecWithTemplate of qual_type
......@@ -696,7 +696,7 @@ and declaration_name =
| DeductionGuideName of decl
| OperatorName of overloaded_operator_kind
| LiteralOperatorName of string
| UsingDirective
| UsingDirectiveName
and record_decl = {
keyword : elaborated_type_keyword;
......@@ -3019,7 +3019,7 @@ let () =
check_pattern quote_decl_list (parse_declaration_list ~language:CXX) example
[%pattern?
[_; { desc = UsingDeclaration {
nested_name_specifier = Some [Namespace "std"];
nested_name_specifier = Some [NamespaceName "std"];
name = IdentifierName "cout" }}]]
]}*)
| Constructor of {
......@@ -3381,8 +3381,8 @@ let () =
{ desc = Return (Some { desc = Call {
callee = { desc = DeclRef ({
nested_name_specifier = Some [
Namespace "ns1";
Namespace "ns2";];
NamespaceName "ns1";
NamespaceName "ns2";];
name = IdentifierName "f"})};
args = []; }})}] }}}] -> ()
| _ -> assert false
......
......@@ -285,8 +285,8 @@ and print_ident_ref fmt ident_ref =
match component with
| Global -> Format.pp_print_string fmt "::"
| NestedIdentifier s -> Format.fprintf fmt "%s::" s
| Namespace name
| NamespaceAlias name ->
| NamespaceName name
| NamespaceAliasName name ->
Format.fprintf fmt "%s::" name
| TypeSpec ty
| TypeSpecWithTemplate ty ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment