mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Start adding var decls to semantics. (#2447)
This is just the declaration, without initialization. Partly breaking it out because I'm changing the placeholder builtin types. Might also need to separate out storage of the var from the name bind.
This commit is contained in:
@@ -46,14 +46,17 @@ class SemanticsParseTreeHandler {
|
||||
// Adds a node to the current block, returning the produced ID.
|
||||
auto AddNode(SemanticsNode node) -> SemanticsNodeId;
|
||||
|
||||
// Pushes a parse tree onto the stack. Used when there is no IR generated by
|
||||
// the node.
|
||||
// Pushes a parse tree node onto the stack. Used when there is no IR generated
|
||||
// by the node.
|
||||
auto Push(ParseTree::Node parse_node) -> void;
|
||||
|
||||
// Pushes a parse tree onto the stack, storing the SemanticsNode as the
|
||||
// Pushes a parse tree node onto the stack, storing the SemanticsNode as the
|
||||
// result.
|
||||
auto Push(ParseTree::Node parse_node, SemanticsNode node) -> void;
|
||||
|
||||
// Pushes a parse tree node onto the stack with an already-built node ID.
|
||||
auto Push(ParseTree::Node parse_node, SemanticsNodeId node_id) -> void;
|
||||
|
||||
// Pops the top of the stack, verifying that it's the expected kind.
|
||||
auto Pop(ParseNodeKind pop_parse_kind) -> void;
|
||||
|
||||
@@ -72,7 +75,9 @@ class SemanticsParseTreeHandler {
|
||||
auto HandleInfixOperator(ParseTree::Node parse_node) -> void;
|
||||
auto HandleLiteral(ParseTree::Node parse_node) -> void;
|
||||
auto HandleParameterList(ParseTree::Node parse_node) -> void;
|
||||
auto HandlePatternBinding(ParseTree::Node parse_node) -> void;
|
||||
auto HandleReturnStatement(ParseTree::Node parse_node) -> void;
|
||||
auto HandleVariableDeclaration(ParseTree::Node parse_node) -> void;
|
||||
|
||||
// Tokens for getting data on literals.
|
||||
const TokenizedBuffer* tokens_;
|
||||
|
||||
Reference in New Issue
Block a user