Skip to content

Commit 2b276a7

Browse files
committed
remove diagnostic types in the favor of lsp-types
1 parent 176a681 commit 2b276a7

File tree

7 files changed

+7
-271
lines changed

7 files changed

+7
-271
lines changed

Diff for: src/ast.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BraceExpression, CompileStatement, CompilerError, ExportStatement, Expression, FunctionStatement, ImportsStatement, KeywordStatement, Node, NodeType, OperatorStatement, ParenExpression, PrimitiveTypeExpression, ProgramStatement, SquareExpression, StringExpression, Token, TokenType, VariableExpression } from './types.js';
2-
import { Range } from './diagnosticTypes.js';
2+
import { Range } from 'lsp-types';
33
import { dictionary } from './dictionary/dictionary.js';
44

55

Diff for: src/diagnostic.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { Diagnostic, DiagnosticSeverity, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport } from './diagnosticTypes.js';
1+
import {Diagnostic,DiagnosticSeverity,DocumentDiagnosticReportKind,FullDocumentDiagnosticReport} from 'lsp-types';
22
import { sysparser, syxparser } from './ast.js';
33
import { tokenizeSys, tokenizeSyx } from './lexer.js';
44
import { isCompilerError } from './types.js';
55
import { readFileSync } from 'fs';
66

77

8+
89
/**
910
* Creates a diagnostic report from the file path given.
1011
* @param {string} filePath Path of the file to create a report.

Diff for: src/diagnosticTypes.ts

-263
This file was deleted.

Diff for: src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { AnyExportable, Export, ExportType, Function, Keyword, OneParameterMethod, Operator, ReturnerMethod, SyntaxScriptCompiler, escapeRegex } from './compiler.js';
22
import { BaseRule,BooleanRule,Functionary,FunctionaryValueType,Rule,RuleType,StringRule, dictionary } from './dictionary/index.js';
33
import { BraceExpression, CompileStatement, ExportStatement, Expression, FunctionStatement, ImportStatement, ImportsStatement, KeywordStatement, OperatorStatement, ParenExpression, PrimitiveTypeExpression, ProgramStatement, RuleStatement, SquareExpression, Statement, StringExpression, VariableExpression, WhitespaceIdentifierExpression } from './types.js';
4-
import { CodeDescription, Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, DiagnosticTag, DocumentDiagnosticReportKind, DocumentUri, FullDocumentDiagnosticReport, Location, Position, Range, URI } from './diagnosticTypes.js';
54
import { CompilerError, isCompilerError } from './types.js';
65
import { Node, NodeType, Token, TokenType } from './types.js';
76
import { SyxConfig, SyxConfigCompile } from './types.js';
@@ -19,7 +18,6 @@ export {Functionary,FunctionaryValueType};
1918

2019
export { SyntaxScriptCompiler, ExportType };
2120
export { AnyExportable, Export, Function, Keyword, OneParameterMethod, Operator, ReturnerMethod };
22-
export { Diagnostic, FullDocumentDiagnosticReport, CodeDescription, DiagnosticRelatedInformation, DiagnosticSeverity, DiagnosticTag, DocumentDiagnosticReportKind, DocumentUri, Location, Position, Range, URI };
2321

2422
export { CompilerError };
2523
export { Token, TokenType, Node, NodeType };

Diff for: src/lexer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CompilerError, Token, TokenType } from './types.js';
2-
import { Position, Range } from './diagnosticTypes.js';
2+
import { Position, Range } from 'lsp-types';
33

44
const keywords: Record<string, TokenType> = {
55
operator: TokenType.OperatorKeyword,

Diff for: src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Position, Range } from './diagnosticTypes.js';
1+
import { Range } from 'lsp-types';
22

33
/**
44
* Every token type a syntax script declaration file can contain. If something can't be recognized as a token,

Diff for: tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"compilerOptions": {
3-
"module": "CommonJS",
3+
"module": "NodeNext",
44
"rootDir": "./src",
55
"outDir": "./dist",
6-
"moduleResolution": "Classic",
6+
"moduleResolution": "NodeNext",
77
"target": "ESNext",
88
"skipLibCheck": true,
99
"allowUnreachableCode": false,

0 commit comments

Comments
 (0)