Skip to content

Commit

Permalink
fixing bug with scanForString:
Browse files Browse the repository at this point in the history
  • Loading branch information
j-brant committed Nov 27, 2023
1 parent 270f7f9 commit 7563c97
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 50 deletions.
6 changes: 3 additions & 3 deletions src/SmaCC_Development/SmaCCSmalltalkCodeGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1104,11 +1104,11 @@ SmaCCSmalltalkCodeGenerator >> scanStringRewriter [
replace:
'self recordMatch: `@m. self step. currentCharacter == `#l1 ifTrue: [self recordMatch: `@m. self step. currentCharacter == `#l2 ifTrue: `@b]. `@.Stmts'
with:
'self recordMatch: `@m. (self scanForString: `{RBLiteralNode value: (String with: `#l1 value with: `#l2 value)}) ifTrue: `@b. `@.Stmts';
'(self scanForString: `{RBLiteralNode value: (String with: `#l1 value with: `#l2 value)} match: `@m) ifTrue: `@b. `@.Stmts';
replace:
'self recordMatch: `@m. (self scanForString: `#l1) ifTrue: [self recordMatch: `@m. self step. currentCharacter == `#l2 ifTrue: `@b]. `@.Stmts'
'(self scanForString: `#l1 match: `@m) ifTrue: [self recordMatch: `@m. self step. currentCharacter == `#l2 ifTrue: `@b]. `@.Stmts'
with:
'self recordMatch: `@m. (self scanForString: `{RBLiteralNode value: (`#l1 value copyWith: `#l2 value)}) ifTrue: `@b. `@.Stmts';
'(self scanForString: `{RBLiteralNode value: (`#l1 value copyWith: `#l2 value)} match: `@m) ifTrue: `@b. `@.Stmts';
yourself
]
Expand Down
Loading

0 comments on commit 7563c97

Please sign in to comment.