diff --git a/language/tokens.ts b/language/tokens.ts index 1de90591..673bcf9e 100644 --- a/language/tokens.ts +++ b/language/tokens.ts @@ -59,7 +59,7 @@ const commonMatchers: Matcher[] = [ { type: `asterisk` }, { type: `word`, match: (word) => - [`CTDATA`, `BLANK`, `BLANKS`, `ZERO`, `ZEROS`, `ON`, `OFF`, `NULL`, `ISO`, `MDY`, `DMY`, `EUR`, `YMD`, `USA`, `SECONDS`, `S`, `MINUTES`, `MN`, `HOURS`, `H`, `DAYS`, `D`, `MONTHS`, `M`, `YEARS`, `Y`, `HIVAL`, `END`, `LOVAL`, `START`, `N`, `OMIT`, `STRING`, `CWIDEN`, `CONVERT`].includes(word.toUpperCase()) || word.toUpperCase().startsWith(`IN`) + [`PSSR`, `CTDATA`, `BLANK`, `BLANKS`, `ZERO`, `ZEROS`, `ON`, `OFF`, `NULL`, `ISO`, `MDY`, `DMY`, `EUR`, `YMD`, `USA`, `SECONDS`, `S`, `MINUTES`, `MN`, `HOURS`, `H`, `DAYS`, `D`, `MONTHS`, `M`, `YEARS`, `Y`, `HIVAL`, `END`, `LOVAL`, `START`, `N`, `OMIT`, `STRING`, `CWIDEN`, `CONVERT`].includes(word.toUpperCase()) || word.toUpperCase().startsWith(`IN`) } ], becomes: { diff --git a/tests/suite/basics.test.ts b/tests/suite/basics.test.ts index 0d770a73..0193c758 100644 --- a/tests/suite/basics.test.ts +++ b/tests/suite/basics.test.ts @@ -1222,7 +1222,6 @@ test(`exec_14`, async () => { const cache = await parser.getDocs(uri, lines, {withIncludes: true, ignoreCache: true}); - console.log(cache.sqlReferences); expect(cache.sqlReferences.length).toBe(1); expect(cache.sqlReferences[0].name).toBe(`table1`); }); diff --git a/tests/suite/directives.test.ts b/tests/suite/directives.test.ts index 7091b4fc..b8817381 100644 --- a/tests/suite/directives.test.ts +++ b/tests/suite/directives.test.ts @@ -603,7 +603,6 @@ test('macro defined test 1', async () => { const cache = await parser.getDocs(uri, lines, { withIncludes: true, ignoreCache: true }); - console.log(cache.procedures); expect(cache.includes.length).toBe(1); expect(cache.procedures.length).toBe(1); }) @@ -622,7 +621,6 @@ test('macro defined test 2', async () => { const cache = await parser.getDocs(uri, lines, { withIncludes: true, ignoreCache: true }); - console.log(cache.procedures); expect(cache.includes.length).toBe(1); expect(cache.procedures.length).toBe(0); }); @@ -641,7 +639,6 @@ test('depth test', async () => { const cache = await parser.getDocs(uri, lines, { withIncludes: true, ignoreCache: true }); - console.log(cache.procedures); expect(cache.includes.length).toBe(2); expect(cache.variables.length).toBe(3); }) \ No newline at end of file diff --git a/tests/suite/linter.test.ts b/tests/suite/linter.test.ts index 71945beb..1ffd1ec8 100644 --- a/tests/suite/linter.test.ts +++ b/tests/suite/linter.test.ts @@ -3,6 +3,7 @@ import path from "path"; import setupParser from "../parserSetup"; import Linter from "../../language/linter"; import { test, expect } from "vitest"; +import { tokenise } from "../../language/tokens"; const parser = setupParser(); const uri = `source.rpgle`; @@ -2792,8 +2793,6 @@ test("issue_175", async () => { NoUnreferenced: true }, cache); - console.log(errors); - console.log(lines.substring(errors[0].offset.position, errors[0].offset.end)); expect(errors.length).toBe(0); });