Skip to content

Commit 3a1e9f2

Browse files
authored
Add support for regular expression literals (#125)
* Update polserver to 548aa2e * Add regexp token test
1 parent 974c105 commit 3a1e9f2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

native/polserver

Submodule polserver updated 124 files

native/test/native.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,11 @@ describe('Tokens - SRC', () => {
11351135
const tokensCRLF = getTokens(textCRLF);
11361136
expect(tokensLF).toEqual(tokensCRLF);
11371137
});
1138+
1139+
it('Can get regexp tokens', () => {
1140+
const tokens = getTokens('/[a-z]+/i');
1141+
expect(tokens).toEqual([[0, 0, 9, 20 /* regexp */, 0]]);
1142+
});
11381143
});
11391144

11401145
describe('Definition - SRC', () => {

0 commit comments

Comments
 (0)