Skip to content

Commit

Permalink
Merge pull request #21 from tfso/chore/build-grammar
Browse files Browse the repository at this point in the history
chore/Build grammar
  • Loading branch information
lostfields authored Mar 7, 2024
2 parents 7d56363 + e1ba365 commit e66edb3
Show file tree
Hide file tree
Showing 12 changed files with 2,022 additions and 2,011 deletions.
2 changes: 1 addition & 1 deletion js-enumerable.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": false
"source.fixAll.eslint": "never"
},
"eslint.validate": [
"typescript",
Expand Down
19 changes: 19 additions & 0 deletions package-lock.json

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

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"lint": "node node_modules/eslint/bin/eslint --ignore-pattern lib/ --ext .ts ./",
"build": "tsc && webpack",
"analyze": "webpack --profile --json > ./stats.json && webpack-bundle-analyzer ./stats.json",
"browserify": "browserify src/test/index.ts -p [ tsify --noImplicitAny ] > lib/mocha-bundle.js"
"browserify": "browserify src/test/index.ts -p [ tsify --noImplicitAny ] > lib/mocha-bundle.js",
"grammar": "npm run grammar:javascript && npm run grammar:odata",
"grammar:javascript": "pegjs -O size -o ./src/linq/peg/parser/javascript-parser.js ./src/linq/peg/grammar/javascript.pegjs",
"grammar:odata": "pegjs -O size -o ./src/linq/peg/parser/odata-parser.js ./src/linq/peg/grammar/odata.pegjs"
},
"author": "Nicolai Gjærum",
"license": "MIT",
Expand All @@ -29,6 +32,7 @@
"@types/node": "^16.6.2",
"@typescript-eslint/eslint-plugin": "^5",
"@typescript-eslint/parser": "^5",
"pegjs": "^0.10.0",
"babel-loader": "^8.2.3",
"babelify": "^10.0.0",
"chai": "^4.3.7",
Expand Down
2 changes: 1 addition & 1 deletion src/linq/peg/expressionvisitor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ODataParser, JavascriptParser, transform, parse } from './parser'
import { transform, parse } from './parser'

import { ExpressionStack } from './expressionstack'

Expand Down
4 changes: 2 additions & 2 deletions src/linq/peg/grammar/javascript.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ QualifiedIdentifier
return {
type: 'RelationalExpression',
operator: 'in',
left: left,
right: right
left: right,
right: left
}
}
/ !ReservedWord qual:Identifier args:Arguments
Expand Down
6 changes: 1 addition & 5 deletions src/linq/peg/parser/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
import ODataParser from './odata-parser'
import JavascriptParser from './javascript-parser'

export { ODataParser, JavascriptParser }
export { transform, parse } from './parser'
export { transform, parse } from './parser'
Loading

0 comments on commit e66edb3

Please sign in to comment.