[Parse/Syntax] Refactoring to decouple the parser from syntax tree creation

Instead of creating syntax nodes directly, modify the parser to invoke an abstract interface 'SyntaxParseActions' while it is parsing the source code.
This decouples the act of parsing from the act of forming a syntax tree representation.
'SyntaxTreeCreator' is an implementation of SyntaxParseActions that handles the logic of creating a syntax tree.
To enforce the layering separation of parsing and syntax tree creation, a static library swiftSyntaxParse is introduced to compose the two.

This decoupling is important for introducing a syntax parser library for SwiftSyntax to directly access parsing.
This commit is contained in:
Argyrios Kyrtzidis
2018-12-09 21:19:08 -08:00
parent 5c42ac378a
commit ab7427723e
38 changed files with 2025 additions and 466 deletions

View File

@@ -8,6 +8,7 @@ if(SWIFT_INCLUDE_TOOLS)
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
ESCAPE_QUOTES @ONLY)
add_subdirectory(Option)
add_subdirectory(Parse)
add_subdirectory(Syntax)
endif()