mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 13:21:18 +00:00
Use more specific node kinds for literals. (#3419)
Sounding out the approach, to make it clearer what a literal node corresponds to.
This commit is contained in:
1 parent
f1ddded3a1
commit
a204689893
107 files changed
+463
-383
No files matched your search
@@ -17,12 +17,12 @@ var x: {."hello" = 0, .y = 4} = {};
|
||||
// CHECK:STDOUT: {kind: 'StructLiteralOrStructTypeLiteralStart', text: '{'},
|
||||
// CHECK:STDOUT: {kind: 'Name', text: '"hello"', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'Literal', text: '0'},
|
||||
// CHECK:STDOUT: {kind: 'IntegerLiteral', text: '0'},
|
||||
// CHECK:STDOUT: {kind: 'StructFieldUnknown', text: '=', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'StructComma', text: ','},
|
||||
// CHECK:STDOUT: {kind: 'Name', text: 'y'},
|
||||
// CHECK:STDOUT: {kind: 'StructFieldDesignator', text: '.', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'Literal', text: '4'},
|
||||
// CHECK:STDOUT: {kind: 'IntegerLiteral', text: '4'},
|
||||
// CHECK:STDOUT: {kind: 'StructFieldValue', text: '=', subtree_size: 4},
|
||||
// CHECK:STDOUT: {kind: 'StructLiteral', text: '}', subtree_size: 11},
|
||||
// CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 13},
|
||||
|
||||
Reference in new issue
Block a user