File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ export class BitwiseOrExpression implements SlangNode {
3838
3939 loc ;
4040
41- leftOperand ;
41+ leftOperand : Expression ;
4242
43- operator ;
43+ operator : string ;
4444
45- rightOperand ;
45+ rightOperand : Expression ;
4646
4747 constructor ( ast : ast . BitwiseOrExpression , options : ParserOptions < AstNode > ) {
4848 let metadata = getNodeMetadata ( ast ) ;
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ export class PositionalArguments implements SlangNode {
1717
1818 loc ;
1919
20- items ;
20+ items : Expression [ ] ;
2121
22- separators ;
22+ separators : string [ ] ;
2323
2424 constructor ( ast : ast . PositionalArguments , options : ParserOptions < AstNode > ) {
2525 let metadata = getNodeMetadata ( ast , true ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export class StringLiteral implements SlangNode {
1414
1515 loc ;
1616
17- variant ;
17+ variant : string ;
1818
1919 constructor ( ast : ast . StringLiteral , options : ParserOptions < AstNode > ) {
2020 const metadata = getNodeMetadata ( ast ) ;
Original file line number Diff line number Diff line change @@ -132,14 +132,13 @@ function collectComments(
132132}
133133
134134export function updateMetadata (
135- metadata : Metadata ,
135+ { comments , loc } : Metadata ,
136136 childNodes : ( StrictAstNode | StrictAstNode [ ] | undefined ) [ ]
137137) : Metadata {
138138 // Collect comments
139- const comments = childNodes . reduce ( collectComments , metadata . comments ) ;
139+ comments = childNodes . reduce ( collectComments , comments ) ;
140140
141141 // calculate correct loc object
142- const { loc } = metadata ;
143142 if ( loc . leadingOffset === 0 ) {
144143 for ( const childNode of childNodes ) {
145144 if ( typeof childNode === 'undefined' || Array . isArray ( childNode ) )
You can’t perform that action at this time.
0 commit comments