File tree Expand file tree Collapse file tree 5 files changed +31
-8
lines changed
Expand file tree Collapse file tree 5 files changed +31
-8
lines changed Original file line number Diff line number Diff line change 112112 "webpack-cli" : " ^6.0.1"
113113 },
114114 "dependencies" : {
115- "@nomicfoundation/slang" : " 1.2.1 " ,
115+ "@nomicfoundation/slang" : " 1.3.0 " ,
116116 "@solidity-parser/parser" : " ^0.20.2" ,
117117 "semver" : " ^7.7.3"
118118 },
Original file line number Diff line number Diff line change 11import { NonterminalKind } from '@nomicfoundation/slang/cst' ;
22import { SlangNode } from './SlangNode.js' ;
3- import { TerminalNode } from './TerminalNode .js' ;
3+ import { AbicoderVersion } from './AbicoderVersion .js' ;
44
55import type * as ast from '@nomicfoundation/slang/ast' ;
66import type { AstPath , Doc } from 'prettier' ;
@@ -9,12 +9,12 @@ import type { PrintFunction } from '../types.d.ts';
99export class AbicoderPragma extends SlangNode {
1010 readonly kind = NonterminalKind . AbicoderPragma ;
1111
12- version : TerminalNode ;
12+ version : AbicoderVersion ;
1313
1414 constructor ( ast : ast . AbicoderPragma ) {
1515 super ( ast ) ;
1616
17- this . version = new TerminalNode ( ast . version ) ;
17+ this . version = new AbicoderVersion ( ast . version ) ;
1818 }
1919
2020 print ( path : AstPath < AbicoderPragma > , print : PrintFunction ) : Doc {
Original file line number Diff line number Diff line change 1+ import { NonterminalKind } from '@nomicfoundation/slang/cst' ;
2+ import { SlangNode } from './SlangNode.js' ;
3+
4+ import type * as ast from '@nomicfoundation/slang/ast' ;
5+ import type { Doc } from 'prettier' ;
6+
7+ export class AbicoderVersion extends SlangNode {
8+ readonly kind = NonterminalKind . AbicoderVersion ;
9+
10+ variant : string ;
11+
12+ constructor ( ast : ast . AbicoderVersion ) {
13+ super ( ast ) ;
14+
15+ this . variant = ast . variant . unparse ( ) ;
16+ }
17+
18+ print ( ) : Doc {
19+ return this . variant ;
20+ }
21+ }
Original file line number Diff line number Diff line change 11import type { AbicoderPragma } from './AbicoderPragma.ts' ;
2+ import type { AbicoderVersion } from './AbicoderVersion.ts' ;
23import type { AdditiveExpression } from './AdditiveExpression.ts' ;
34import type { AddressType } from './AddressType.ts' ;
45import type { AndExpression } from './AndExpression.ts' ;
@@ -242,6 +243,7 @@ export type StrictAstNode =
242243 | SourceUnit
243244 | PragmaDirective
244245 | AbicoderPragma
246+ | AbicoderVersion
245247 | ExperimentalPragma
246248 | VersionPragma
247249 | VersionRange
You can’t perform that action at this time.
0 commit comments