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

Optimize by moving constant values into global init #78

Merged
merged 1 commit into from
Jan 4, 2024
Merged
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
17 changes: 9 additions & 8 deletions odata-parser.pegjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{{
const methods = {
cast: [ 1, 2 ],
ceiling: 1,
Expand Down Expand Up @@ -66,20 +66,21 @@
// mod: 5
// };

let binds = [];
let precedence = 0;
function reset() {
binds = [];
precedence = 0;
};

function CollapseObjectArray(options) {
const optionsObj = {};
for(const i in options) {
optionsObj[options[i].name] = options[i].value;
}
return optionsObj;
};
}}
{
let binds = [];
let precedence = 0;
function reset() {
binds = [];
precedence = 0;
};

function Bind(type, value) {
binds.push([type, value])
Expand Down
Loading