Skip to content

Commit

Permalink
Resolves #32 - Cross-dependency issue between server/parser
Browse files Browse the repository at this point in the history
  • Loading branch information
parithon authored and lispercat committed Dec 15, 2022
1 parent d9a1ff9 commit 0a57f05
Show file tree
Hide file tree
Showing 23 changed files with 3,481 additions and 58 deletions.
11 changes: 10 additions & 1 deletion client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3,457 changes: 3,446 additions & 11 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
"license": "MIT",
"publisher": "AndreiStebakov",
"contributors": [
"Andrei Stebakov"
"Andrei Stebakov",
{
"name": "Anthony Conrad",
"email": "parithon@outlook.com"
}
],
"categories": [
"Other"
Expand Down Expand Up @@ -292,7 +296,7 @@
"watch": "tsc -b -w",
"postinstall": "cd client && npm install && cd ../server && npm install && cd ..",
"test": "node ./test/out/runTest.js",
"antlr4ts": "del-cli parser/src/SPBS* !parser/src/*Impl.ts && antlr4ts -visitor -o parser/src -Xexact-output-dir beanshell_grammar/SPBSLexer.g4 beanshell_grammar/SPBSParser.g4"
"antlr4ts": "del-cli server/src/parser/SPBS* !server/src/parser/*Impl.ts && antlr4ts -visitor -o server/src/parser -Xexact-output-dir beanshell_grammar/SPBSLexer.g4 beanshell_grammar/SPBSParser.g4"
},
"devDependencies": {
"@types/glob": "^7.1.4",
Expand Down
16 changes: 0 additions & 16 deletions parser/package.json

This file was deleted.

13 changes: 0 additions & 13 deletions parser/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion parser/tsconfig.tsbuildinfo

This file was deleted.

11 changes: 10 additions & 1 deletion server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ErrorNode } from 'antlr4ts/tree/ErrorNode';
import {SPBSParserListener} from './SPBSParserListener'
import { Xml_elementContext } from "./SPBSParser";
import { TerminalNode } from 'antlr4ts/tree/TerminalNode';
import {IIQObjectInfoImpl} from '../../server/out/common-types';
import {IIQObjectInfoImpl, IIQObjectType} from '../common-types';

export class SPBSParserListenerImpl implements SPBSParserListener{
private m_errors: Object[];
Expand Down Expand Up @@ -51,7 +51,7 @@ export class SPBSParserListenerImpl implements SPBSParserListener{
.filter(attr => attr.XMLName().text == "language")
.map(el => el.STRING().text.replace(/'|"/g, ""))
.reduce((prev, curr) => prev + curr, "");
this.m_data["type"] = "Rule";
this.m_data["type"] = IIQObjectType.Rule;
this.m_data["name"] = name;
if(null == this.m_data["language"]){
this.m_data["language"] = language;
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import {

import { createConnection } from 'vscode-languageserver/node';
import { TextDocument } from 'vscode-languageserver-textdocument';
import {SPBSLexer} from '../../parser/out/SPBSLexer';
import {SPBSParser} from '../../parser/out/SPBSParser';
import {SPBSParserVisitorImpl} from '../../parser/out/SPBSParserVisitorImpl';
import {SPBSLexer} from './parser/SPBSLexer';
import {SPBSParser} from './parser/SPBSParser';
import {SPBSParserVisitorImpl} from './parser/SPBSParserVisitorImpl';
import {CharStreams, CommonTokenStream} from 'antlr4ts';
import {ParserErrorListenerImpl} from "../../parser/out/ParserErrorListenerImpl";
import {LexerErrorListenerImpl} from "../../parser/out/LexerErrorListenerImpl";
import {SPBSParserListenerImpl} from "../../parser/out/SPBSParserListenerImpl";
import {ParserErrorListenerImpl} from "./parser/ParserErrorListenerImpl";
import {LexerErrorListenerImpl} from "./parser/LexerErrorListenerImpl";
import {SPBSParserListenerImpl} from "./parser/SPBSParserListenerImpl";
import { IIQObjectInfo, IIQDictionary, IIQObjectInfoImpl } from './common-types';
import * as proto from 'vscode-languageserver-protocol';
import * as fs from 'fs';
Expand Down
5 changes: 1 addition & 4 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@
"rootDir": "src"
},
"include": ["src"],
"exclude": ["node_modules", ".vscode-test"],
"references": [
{ "path": "../parser" }
]
"exclude": ["node_modules", ".vscode-test"]
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
],
"references": [
{ "path": "./client" },
{ "path": "./parser" },
{ "path": "./server" },
{ "path": "./test" }
]
Expand Down

0 comments on commit 0a57f05

Please sign in to comment.