mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 06:20:11 +01:00
* adding methods to the ast * pre commit stuff? * implementation of class functions * implemented methods * some cleanup * more cleanup * add newlines in test programs * pre-commit fixups * added include of return_term.h * a test of a method calling another method * replacing Member with Declaration * removing the member.h etc files * clarify a type annotation * update uses of FunctionDeclaration * remove ReturnTarget, no longer needed * more cleanup * more cleanup * yet more cleanup, playing with pre-commit * did a pre-commit run --all-files * fixed const issue * remove comment * checking dependencies in BUILD files and headers * pre-commit working now * refactor NominalClassType to just hold a pointer to the class declaration * remove Member from rtti * responding to Geoffreys review * change field_types to a non-member function
The code in this directory is responsible for translating Carbon source code to
the AST defined in ast. It consists primarily of a Flex lexer
defined in lexer.lpp and a Bison grammar defined in
parser.ypp.
It is possible to define and test a new expression syntax without defining its
semantics by using the UnimplementedExpression AST node type and the same
techniques can be applied to other kinds of AST nodes as needed. See the
handling of the UNIMPL_EXAMPLE token for an example of how this is done, and
see unimplemented_example_test.cpp for an
example of how to test it.