Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes issue #35 #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ The parser only currently supports SELECT queries but is able to produce a Selec
FROM `my_table`
WHERE `foo` = 'bar'

Using Variables
---------------

The parser and lexer also support setting special variables

let tokens = lexer.tokenize('select * from my_table where foo = '{bar}', {
variableTokens: '{bar}'
})
parser.parse(tokens).toString()

SELECT *
FROM `my_table`
WHERE `foo` = '{bar}'



Credits
-------
Expand Down
104 changes: 67 additions & 37 deletions browser/sql-parser.js

Large diffs are not rendered by default.

71 changes: 37 additions & 34 deletions lib/compiled_parser.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion lib/grammar.js

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

13 changes: 11 additions & 2 deletions lib/lexer.js

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

20 changes: 19 additions & 1 deletion lib/nodes.js

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

Loading