[all-commits] [llvm/llvm-project] 8abb5f: [SyntaxTree] Use simplified grammar rule for `Nest...

Eduardo Caldas via All-commits all-commits at lists.llvm.org
Fri Aug 7 11:06:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8abb5fb68f81b0e42d824bf080b1cef9a61559d6
      https://github.com/llvm/llvm-project/commit/8abb5fb68f81b0e42d824bf080b1cef9a61559d6
  Author: Eduardo Caldas <ecaldas at google.com>
  Date:   2020-08-07 (Fri, 07 Aug 2020)

  Changed paths:
    M clang/include/clang/Tooling/Syntax/Nodes.h
    M clang/lib/Tooling/Syntax/BuildTree.cpp
    M clang/lib/Tooling/Syntax/Nodes.cpp
    M clang/unittests/Tooling/Syntax/TreeTest.cpp

  Log Message:
  -----------
  [SyntaxTree] Use simplified grammar rule for `NestedNameSpecifier` grammar nodes

This is our grammar rule for nested-name-specifiers:
globalbal-specifier:
  /*empty*/
simple-template-specifier:
  template_opt simple-template-id
name-specifier:
  global-specifier
  decltype-specifier
  identifier
  simple-template-specifier
nested-name-specifier:
  list(name-specifier, ::, non-empty, terminated)

It is a relaxed version of C++ [expr.prim.id] and quite simpler to map to our API.

TODO: refine name specifiers, `simple-template-name-specifier` and
decltype-name-specifier` are token soup for now.




More information about the All-commits mailing list