@@ -5,7 +5,7 @@ interface Cursor {
55 value : number ;
66}
77
8- export function parseResult ( input : string ) : WASM . Value | undefined {
8+ export function parseResult ( input : string ) : WASM . Value < WASM . Type > | undefined {
99 let cursor = 0 ;
1010 let delta : number = consume ( input , cursor , / \( / d) ;
1111 if ( delta === 0 ) {
@@ -14,13 +14,13 @@ export function parseResult(input: string): WASM.Value | undefined {
1414 cursor += delta ;
1515
1616 delta = consume ( input , cursor , / ^ [ ^ . ) ] * / d) ;
17- const type : WASM . Type = WASM . typing . get ( input . slice ( cursor , cursor + delta ) ) ?? WASM . Type . i64 ;
17+ const type : WASM . Type = WASM . typing . get ( input . slice ( cursor , cursor + delta ) ) ?? WASM . Integer . i64 ;
1818
1919 cursor += delta + consume ( input , cursor + delta ) ;
2020
2121 let value ;
2222 delta = consume ( input , cursor , / ^ [ ^ ) ] * / d) ;
23- if ( type === WASM . Type . f32 || type === WASM . Type . f64 ) {
23+ if ( type === WASM . Float . f32 || type === WASM . Float . f64 ) {
2424 value = parseHexFloat ( input . slice ( cursor , cursor + delta ) ) ;
2525 } else {
2626 value = parseInteger ( input . slice ( cursor , cursor + delta ) ) ;
@@ -33,8 +33,8 @@ export function parseResult(input: string): WASM.Value | undefined {
3333 return { type, value} ;
3434}
3535
36- export function parseArguments ( input : string , index : Cursor ) : WASM . Value [ ] {
37- const args : WASM . Value [ ] = [ ] ;
36+ export function parseArguments ( input : string , index : Cursor ) : WASM . Value < WASM . Type > [ ] {
37+ const args : WASM . Value < WASM . Type > [ ] = [ ] ;
3838
3939 let cursor : number = consume ( input , 0 , / i n v o k e " [ ^ " ] + " / d) ;
4040 while ( cursor < input . length ) {
@@ -45,12 +45,12 @@ export function parseArguments(input: string, index: Cursor): WASM.Value[] {
4545 cursor += delta ;
4646
4747 delta = consume ( input , cursor , / ^ [ ^ . ) ] * / d) ;
48- const type : WASM . Type = WASM . typing . get ( input . slice ( cursor + delta - 3 , cursor + delta ) ) ?? WASM . Type . i64 ;
48+ const type : WASM . Type = WASM . typing . get ( input . slice ( cursor + delta - 3 , cursor + delta ) ) ?? WASM . Integer . i64 ;
4949
5050 cursor += delta + consume ( input , cursor + delta , / ^ [ ^ ) ] * c o n s t / d) ;
5151 delta = consume ( input , cursor , / ^ [ ^ ) ] * / d) ;
5252 let maybe : number | undefined ;
53- if ( type === WASM . Type . f32 || type === WASM . Type . f64 ) {
53+ if ( type === WASM . Float . f32 || type === WASM . Float . f64 ) {
5454 maybe = parseHexFloat ( input . slice ( cursor , cursor + delta ) ) ;
5555 } else {
5656 maybe = parseInteger ( input . slice ( cursor , cursor + delta ) ) ;
0 commit comments