diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..b2e707a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,20 @@ +module.exports = { + 'env': { + 'commonjs': true, + 'es2021': true, + }, + 'extends': 'google', + 'overrides': [ + ], + 'parserOptions': { + 'ecmaVersion': 'latest', + 'sourceType': 'module', + }, + 'rules': { + 'indent': ['error', 2, {'SwitchCase': 1}], + 'max-len': [ + 'error', + {'code': 120, 'ignoreComments': true, 'ignoreUrls': true, 'ignoreStrings': true}, + ], + }, +}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1491f7e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +/src/** linguist-vendored +/examples/* linguist-vendored + +src/grammar.json linguist-generated +src/node-types.json linguist-generated +src/parser.c linguist-generated + +src/grammar.json -diff +src/node-types.json -diff +src/parser.c -diff diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bc5b45f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + pull_request: + branches: + - "**" + push: + branches: + - "master" +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [macos-latest, ubuntu-latest] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install + - run: npm test + + test_windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install + - run: npm run-script test-windows diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml new file mode 100644 index 0000000..29718fa --- /dev/null +++ b/.github/workflows/fuzz.yml @@ -0,0 +1,22 @@ +name: Fuzz Parser + +on: + push: + paths: + - src/scanner.c + pull_request: + paths: + - src/scanner.c + workflow_dispatch: + +jobs: + test: + name: Parser fuzzing + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: vigoux/tree-sitter-fuzz-action@v1 + with: + language: gn + external-scanner: src/scanner.c + time: 60 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d94f7f3 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: Lint + +on: + push: + branches: + - master + pull_request: + branches: + - "**" + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install modules + run: npm install + - name: Run ESLint + run: npm run lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f58682b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,82 @@ +name: Release + +on: + workflow_run: + workflows: ["CI"] + types: + - completed + +permissions: + contents: write + pull-requests: write + +jobs: + release: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/master' }} + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: node + package-name: tree-sitter-gn + + - uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update Rust version + run: | + git fetch origin release-please--branches--master--components--tree-sitter-gn + git checkout release-please--branches--master--components--tree-sitter-gn + + git config user.name github-actions[bot] + git config user.email github-actions[bot]@users.noreply.github.com + + repo_name="${{ github.repository }}" + repo_name="${repo_name##*/}" + version=$(grep -o '"version": *"[^"]*"' package.json | sed 's/"version": "\(.*\)"/\1/') + + sed -i "s/version = \"[^\"]*\"/version = \"$version\"/g" Cargo.toml + sed -i "s/$repo_name = \"[^\"]*\"/$repo_name = \"$version\"/g" bindings/rust/README.md + + git add Cargo.toml bindings/rust/README.md + git commit --amend --no-edit + git push -f + + - name: Setup Node + if: ${{ steps.release.outputs.release_created }} + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: "https://registry.npmjs.org" + - name: Publish to NPM + if: ${{ steps.release.outputs.release_created }} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: npm publish + + - name: Setup Rust + if: ${{ steps.release.outputs.release_created }} + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Publish to Crates.io + if: ${{ steps.release.outputs.release_created }} + uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + - name: Tag stable versions + if: ${{ steps.release.outputs.release_created }} + run: | + git checkout master + git config user.name github-actions[bot] + git config user.email github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" + git tag -d stable || true + git push origin :stable || true + git tag -a stable -m "Last Stable Release" + git push origin stable diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd77f41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +Cargo.lock +node_modules +build +package-lock.json +/target/ +.build/ \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..20136bf --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +/test +/examples +/build +/script +/target +/bindings/rust diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..cf9ae40 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "tree-sitter-gn" +description = "GN grammar for the tree-sitter parsing library" +version = "0.0.1" +authors = ["Amaan Qureshi "] +license = "MIT" +readme = "bindings/rust/README.md" +keywords = ["incremental", "parsing", "gn"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/amaanq/tree-sitter-gn" +edition = "2021" +autoexamples = false + +build = "bindings/rust/build.rs" +include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter = "~0.20.10" + +[build-dependencies] +cc = "~1.0.83" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5af5363 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Amaan Qureshi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..c6285ca --- /dev/null +++ b/Package.swift @@ -0,0 +1,33 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterGN", + products: [ + .library(name: "TreeSitterGN", targets: ["TreeSitterGN"]), + ], + dependencies: [], + targets: [ + .target(name: "TreeSitterGN", + path: ".", + exclude: [ + "binding.gyp", + "bindings", + "Cargo.toml", + "corpus", + "grammar.js", + "LICENSE", + "package.json", + "README.md", + ], + sources: [ + "src/parser.c", + "src/scanner.c", + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")]) + ] +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ddfc41 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# tree-sitter-gn + +[![CI](https://github.com/amaanq/tree-sitter-gn/actions/workflows/ci.yml/badge.svg)](https://github.com/amaanq/tree-sitter-gn/actions/workflows/ci.yml) +[![Discord](https://img.shields.io/discord/1063097320771698699?logo=discord)](https://discord.gg/w7nTvsVJhm) + +[GN](https://gn.googlesource.com/gn/+/main/docs/reference.md#grammar) grammar for +[tree-sitter](https://github.com/tree-sitter/tree-sitter). diff --git a/binding.gyp b/binding.gyp new file mode 100644 index 0000000..5957167 --- /dev/null +++ b/binding.gyp @@ -0,0 +1,19 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_gn_binding", + "include_dirs": [ + " + +using namespace v8; + +extern "C" TSLanguage *tree_sitter_gn(); + +namespace { + +NAN_METHOD(New) {} + +void Init(Local exports, Local module) { + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("Language").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); + Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_gn()); + + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("gn").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +} + +NODE_MODULE(tree_sitter_gn_binding, Init) + +} // namespace diff --git a/bindings/node/index.js b/bindings/node/index.js new file mode 100644 index 0000000..f13464c --- /dev/null +++ b/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require('../../build/Release/tree_sitter_gn_binding'); +} catch (error1) { + if (error1.code !== 'MODULE_NOT_FOUND') { + throw error1; + } + try { + module.exports = require('../../build/Debug/tree_sitter_gn_binding'); + } catch (error2) { + if (error2.code !== 'MODULE_NOT_FOUND') { + throw error2; + } + throw error1; + } +} + +try { + module.exports.nodeTypeInfo = require('../../src/node-types.json'); +} catch (_) {} diff --git a/bindings/rust/README.md b/bindings/rust/README.md new file mode 100644 index 0000000..1e7ada3 --- /dev/null +++ b/bindings/rust/README.md @@ -0,0 +1,42 @@ +# tree-sitter-gn + +This crate provides a GN grammar for the [tree-sitter][] parsing library. +To use this crate, add it to the `[dependencies]` section of your `Cargo.toml` +file. (Note that you will probably also need to depend on the +[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful +way.) + +```toml +[dependencies] +tree-sitter = "0.20.10" +tree-sitter-gn = "0.0.1" +``` + +Typically, you will use the [language][language func] function to add this +grammar to a tree-sitter [Parser][], and then use the parser to parse some code: + +```rust +let code = r#" +import("//build/config/BUILDCONFIG.gn") + +if (is_debug) { + executable("foo") { + sources = [ + "foo.cc", + ] + } +} +"#; +let mut parser = Parser::new(); +parser.set_language(tree_sitter_gn::language()).expect("Error loading GN grammar"); +let parsed = parser.parse(code, None); +``` + +If you have any questions, please reach out to us in the [tree-sitter +discussions] page. + +[language func]: https://docs.rs/tree-sitter-gn/*/tree_sitter_gn/fn.language.html +[Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +[tree-sitter]: https://tree-sitter.github.io/ +[tree-sitter crate]: https://crates.io/crates/tree-sitter +[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs new file mode 100644 index 0000000..8851fed --- /dev/null +++ b/bindings/rust/build.rs @@ -0,0 +1,19 @@ +fn main() { + let src_dir = std::path::Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.include(src_dir); + c_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable") + .flag_if_supported("-Wno-trigraphs"); + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + + let scanner_path = src_dir.join("scanner.c"); + c_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + + c_config.compile("parser"); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); +} diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs new file mode 100644 index 0000000..2d6a750 --- /dev/null +++ b/bindings/rust/lib.rs @@ -0,0 +1,52 @@ +//! This crate provides GN language support for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [language][language func] function to add this language to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! let code = ""; +//! let mut parser = tree_sitter::Parser::new(); +//! parser.set_language(tree_sitter_gn::language()).expect("Error loading GN grammar"); +//! let tree = parser.parse(code, None).unwrap(); +//! ``` +//! +//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +//! [language func]: fn.language.html +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter::Language; + +extern "C" { + fn tree_sitter_gn() -> Language; +} + +/// Get the tree-sitter [Language][] for this grammar. +/// +/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +pub fn language() -> Language { + unsafe { tree_sitter_gn() } +} + +/// The content of the [`node-types.json`][] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); + +// Uncomment these to include any queries that this grammar contains + +pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); +// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); + +#[cfg(test)] +mod tests { + #[test] + fn test_can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(super::language()) + .expect("Error loading GN grammar"); + } +} diff --git a/bindings/swift/TreeSitterGN/gn.h b/bindings/swift/TreeSitterGN/gn.h new file mode 100644 index 0000000..767647b --- /dev/null +++ b/bindings/swift/TreeSitterGN/gn.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_GN_H_ +#define TREE_SITTER_GN_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +extern TSLanguage *tree_sitter_gn(); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_GN_H_ diff --git a/grammar.js b/grammar.js new file mode 100644 index 0000000..1a164dd --- /dev/null +++ b/grammar.js @@ -0,0 +1,225 @@ +/** + * @file GN grammar for tree-sitter + * @author Amaan Qureshi + * @license MIT + */ + +/* eslint-disable arrow-parens */ +/* eslint-disable camelcase */ +/* eslint-disable-next-line spaced-comment */ +/// +// @ts-check + +const PREC = { + LOGICAL_OR: 1, + LOGICAL_AND: 2, + EQUALITY: 3, + COMPARE: 4, + ADD: 4, + CALL: 5, + MEMBER: 6, + UNARY: 7, +}; + +module.exports = grammar({ + name: 'gn', + + externals: $ => [ + $._string_content, + ], + + extras: $ => [ + /\s/, + $.comment, + ], + + supertypes: $ => [ + $.statement, + $.expression, + ], + + word: $ => $.identifier, + + rules: { + source_file: $ => repeat($.statement), + + statement: $ => choice( + $.import_statement, + $.if_statement, + $.foreach_statement, + $.assignment_statement, + $.expression, + ), + + import_statement: $ => seq( + 'import', + '(', + $.expression, + ')', + ), + + if_statement: $ => prec.right(seq( + 'if', + '(', + field('condition', $.expression), + ')', + field('consequence', $.block), + repeat($.else_statement), + )), + + else_statement: $ => seq( + 'else', + field('alternative', choice($.if_statement, $.block)), + ), + + foreach_statement: $ => seq( + 'foreach', + '(', + field('item', $.identifier), + ',', + field('list', $.expression), + ')', + $.block, + ), + + block: $ => seq( + '{', + repeat($.statement), + '}', + ), + + assignment_statement: $ => seq( + choice($.identifier, $.array_access, $.scope_access), + choice('=', '+=', '-='), + $.expression, + ), + + expression: $ => choice( + $.unary_expression, + $.binary_expression, + $.primary_expression, + ), + + primary_expression: $ => choice( + $.identifier, + $.integer, + $.string, + $.boolean, + $.call_expression, + $.array_access, + $.scope_access, + $.block, + $.parenthesized_expression, + $.list, + ), + + unary_expression: $ => prec.left(1, seq( + '!', + $.primary_expression, + )), + + binary_expression: $ => { + const table = [ + [choice('+', '-'), PREC.ADD], + [choice('<', '<=', '>', '>='), PREC.COMPARE], + [choice('==', '!='), PREC.EQUALITY], + ['&&', PREC.LOGICAL_AND], + ['||', PREC.LOGICAL_OR], + ]; + + // @ts-ignore + return choice(...table.map(([operator, precedence]) => prec.left(precedence, seq( + field('left', $.expression), + // @ts-ignore + field('operator', operator), + field('right', $.expression), + )))); + }, + + call_expression: $ => prec.left(PREC.CALL, seq( + field('function', $.identifier), + '(', + commaSep($.expression), + ')', + optional($.block), + )), + + array_access: $ => prec.left(PREC.MEMBER, seq( + field('array', $.expression), + '[', + field('index', $.expression), + ']', + )), + + scope_access: $ => prec.left(PREC.MEMBER, seq( + field('scope', $.expression), + '.', + field('field', $.identifier), + )), + + parenthesized_expression: $ => seq( + '(', + $.expression, + ')', + ), + + list: $ => seq( + '[', + commaSep($.expression), + ']', + ), + + string: $ => seq( + '"', + optional($.string_content), + '"', + ), + + string_content: $ => repeat1(choice( + $.escape_sequence, + $.expansion, + $._string_content, + )), + + escape_sequence: _ => /\\["$\\]/, + + expansion: $ => choice( + seq('$', choice($.identifier, $.hex)), + seq('${', choice($.identifier, $.array_access, $.scope_access), '}'), + ), + + integer: _ => /-?\d+/, + + hex: _ => /0x[0-9a-fA-F]+/, + + boolean: _ => choice('true', 'false'), + + identifier: _ => /[a-zA-Z_][a-zA-Z0-9_]*/, + + comment: _ => token(seq('#', /.*/)), + }, +}); + +/** + * Creates a rule to optionally match one or more of the rules separated by a comma + * + * @param {Rule} rule + * + * @return {ChoiceRule} + * + */ +function commaSep(rule) { + return optional(commaSep1(rule)); +} + +/** + * Creates a rule to match one or more of the rules separated by a comma + * + * @param {Rule} rule + * + * @return {SeqRule} + * + */ +function commaSep1(rule) { + return seq(rule, repeat(seq(',', rule)), optional(',')); +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c6e34e8 --- /dev/null +++ b/package.json @@ -0,0 +1,45 @@ +{ + "name": "tree-sitter-gn", + "version": "0.0.1", + "description": "GN (Generate Ninja) grammar for tree-sitter", + "main": "bindings/node", + "keywords": [ + "parsing", + "incremental", + "gn", + "generate ninja" + ], + "author": "Amaan Qureshi ", + "license": "MIT", + "dependencies": { + "nan": "^2.12.1" + }, + "devDependencies": { + "eslint": ">=5.16.0", + "eslint-config-google": "^0.14.0", + "tree-sitter-cli": "^0.20.8" + }, + "scripts": { + "build": "tree-sitter generate && node-gyp build", + "lint": "eslint grammar.js", + "parse": "tree-sitter parse", + "test": "tree-sitter test && script/parse-examples", + "test-windows": "tree-sitter test" + }, + "repository": "https://github.com/amaanq/tree-sitter-gn", + "tree-sitter": [ + { + "scope": "source.gn", + "file-types": [ + "gn" + ], + "injection-regex": "gn", + "highlights": [ + "queries/highlights.scm" + ], + "injections": [ + "queries/injections.scm" + ] + } + ] +} diff --git a/queries/folds.scm b/queries/folds.scm new file mode 100644 index 0000000..352b0f0 --- /dev/null +++ b/queries/folds.scm @@ -0,0 +1,6 @@ +[ + (list) + (block) + (if_statement) + (else_statement) +] @fold diff --git a/queries/highlights.scm b/queries/highlights.scm new file mode 100644 index 0000000..87082a3 --- /dev/null +++ b/queries/highlights.scm @@ -0,0 +1,74 @@ +; Includes + +"import" @include + +; Conditionals + +[ + "if" + "else" +] @conditional + +; Repeats + +"foreach" @repeat + +; Operators + +[ + "=" + "+=" + "-=" + "!" + "+" + "-" + "<" + "<=" + ">" + ">=" + "==" + "!=" + "&&" + "||" +] @operator + +; Variables + +(identifier) @variable + +; Functions + +(call_expression function: (identifier) @function.call) + +; Fields + +(scope_access field: (identifier) @field) + +; Literals + +(string) @string + +(escape_sequence) @string.escape + +(expansion) @none + +(integer) @number + +(hex) @string.special + +(boolean) @boolean + +; Punctuation + +[ "{" "}" "[" "]" "(" ")" ] @punctuation.bracket + +[ + "." + "," +] @punctuation.delimiter + +(expansion ["$" "${" "}"] @punctuation.special) + +; Comments + +(comment) @comment diff --git a/queries/indents.scm b/queries/indents.scm new file mode 100644 index 0000000..82f4471 --- /dev/null +++ b/queries/indents.scm @@ -0,0 +1,12 @@ +[ + (block) + (parenthesized_expression) +] @indent.begin + +[ + "}" + ")" + "]" +] @indent.end @indent.branch + +(comment) @indent.auto diff --git a/queries/injections.scm b/queries/injections.scm new file mode 100644 index 0000000..2f0e58e --- /dev/null +++ b/queries/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/queries/locals.scm b/queries/locals.scm new file mode 100644 index 0000000..1350a23 --- /dev/null +++ b/queries/locals.scm @@ -0,0 +1,6 @@ +[ + (source_file) + (block) +] @scope + +(identifier) @reference diff --git a/script/known_failures.txt b/script/known_failures.txt new file mode 100644 index 0000000..e69de29 diff --git a/script/parse-examples b/script/parse-examples new file mode 100755 index 0000000..8b39711 --- /dev/null +++ b/script/parse-examples @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +set -eu + +cd "$(dirname "$0")/.." + +function clone_repo { + owner=$1 + name=$2 + + path=examples/$name + if [ ! -d "$path" ]; then + echo "Cloning $owner/$name" + git clone "https://github.com/$owner/$name" "$path" --depth 1 --single-branch --branch=main --filter=blob:none + fi +} + +clone_repo chromium chromium +clone_repo Alex313031 thorium + +known_failures="$(cat script/known_failures.txt)" + +# shellcheck disable=2046 +tree-sitter parse -q \ + 'examples/**/*.gn' \ + 'examples/**/*.gni' \ + $(for file in $known_failures; do echo "!${file}"; done) + +example_count=$(find examples -name '*.gn' -o -name '*.gni' | wc -l) +failure_count=$(wc -w <<<"$known_failures") +success_count=$((example_count - failure_count)) +success_percent=$(bc -l <<<"100*${success_count}/${example_count}") + +printf \ + "Successfully parsed %d of %d example files (%.1f%%)\n" \ + "$success_count" "$example_count" "$success_percent" diff --git a/src/grammar.json b/src/grammar.json new file mode 100644 index 0000000..9a75c6b --- /dev/null +++ b/src/grammar.json @@ -0,0 +1,907 @@ +{ + "name": "gn", + "word": "identifier", + "rules": { + "source_file": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + "statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "import_statement" + }, + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "foreach_statement" + }, + { + "type": "SYMBOL", + "name": "assignment_statement" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "import_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "import" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "if_statement": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "block" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "else_statement" + } + } + ] + } + }, + "else_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + } + } + ] + }, + "foreach_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "foreach" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "item", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "list", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + "block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "assignment_statement": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "array_access" + }, + { + "type": "SYMBOL", + "name": "scope_access" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + } + ] + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "unary_expression" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ] + }, + "primary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "integer" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "boolean" + }, + { + "type": "SYMBOL", + "name": "call_expression" + }, + { + "type": "SYMBOL", + "name": "array_access" + }, + { + "type": "SYMBOL", + "name": "scope_access" + }, + { + "type": "SYMBOL", + "name": "block" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "list" + } + ] + }, + "unary_expression": { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ] + } + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "STRING", + "value": ">=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "==" + }, + { + "type": "STRING", + "value": "!=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "||" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + } + ] + }, + "call_expression": { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "block" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "array_access": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "array", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "index", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "scope_access": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "scope", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + } + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "string": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_content" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + "string_content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "expansion" + }, + { + "type": "SYMBOL", + "name": "_string_content" + } + ] + } + }, + "escape_sequence": { + "type": "PATTERN", + "value": "\\\\[\"$\\\\]" + }, + "expansion": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "$" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "hex" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "${" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "array_access" + }, + { + "type": "SYMBOL", + "name": "scope_access" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + "integer": { + "type": "PATTERN", + "value": "-?\\d+" + }, + "hex": { + "type": "PATTERN", + "value": "0x[0-9a-fA-F]+" + }, + "boolean": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + } + ] + }, + "identifier": { + "type": "PATTERN", + "value": "[a-zA-Z_][a-zA-Z0-9_]*" + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "PATTERN", + "value": ".*" + } + ] + } + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + }, + { + "type": "SYMBOL", + "name": "comment" + } + ], + "conflicts": [], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "_string_content" + } + ], + "inline": [], + "supertypes": [ + "statement", + "expression" + ] +} + diff --git a/src/node-types.json b/src/node-types.json new file mode 100644 index 0000000..10bff2a --- /dev/null +++ b/src/node-types.json @@ -0,0 +1,670 @@ +[ + { + "type": "expression", + "named": true, + "subtypes": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "primary_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + }, + { + "type": "statement", + "named": true, + "subtypes": [ + { + "type": "assignment_statement", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "foreach_statement", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "import_statement", + "named": true + } + ] + }, + { + "type": "array_access", + "named": true, + "fields": { + "array": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "index": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "assignment_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "array_access", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "scope_access", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "&&", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": "||", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "boolean", + "named": true, + "fields": {} + }, + { + "type": "call_expression", + "named": true, + "fields": { + "function": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "block", + "named": true + }, + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "else_statement", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + }, + { + "type": "if_statement", + "named": true + } + ] + } + } + }, + { + "type": "expansion", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_access", + "named": true + }, + { + "type": "hex", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "scope_access", + "named": true + } + ] + } + }, + { + "type": "foreach_statement", + "named": true, + "fields": { + "item": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "list": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + }, + { + "type": "if_statement", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "else_statement", + "named": true + } + ] + } + }, + { + "type": "import_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "primary_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_access", + "named": true + }, + { + "type": "block", + "named": true + }, + { + "type": "boolean", + "named": true + }, + { + "type": "call_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "scope_access", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + }, + { + "type": "scope_access", + "named": true, + "fields": { + "field": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "scope": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "source_file", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "string", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "string_content", + "named": true + } + ] + } + }, + { + "type": "string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + }, + { + "type": "expansion", + "named": true + } + ] + } + }, + { + "type": "unary_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary_expression", + "named": true + } + ] + } + }, + { + "type": "!", + "named": false + }, + { + "type": "!=", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "$", + "named": false + }, + { + "type": "${", + "named": false + }, + { + "type": "&&", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "comment", + "named": true + }, + { + "type": "else", + "named": false + }, + { + "type": "escape_sequence", + "named": true + }, + { + "type": "false", + "named": false + }, + { + "type": "foreach", + "named": false + }, + { + "type": "hex", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "import", + "named": false + }, + { + "type": "integer", + "named": true + }, + { + "type": "true", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "||", + "named": false + }, + { + "type": "}", + "named": false + } +] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c new file mode 100644 index 0000000..4ab62cb --- /dev/null +++ b/src/parser.c @@ -0,0 +1,7731 @@ +#include "tree_sitter/parser.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 14 +#define STATE_COUNT 228 +#define LARGE_STATE_COUNT 11 +#define SYMBOL_COUNT 63 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 38 +#define EXTERNAL_TOKEN_COUNT 1 +#define FIELD_COUNT 13 +#define MAX_ALIAS_SEQUENCE_LENGTH 7 +#define PRODUCTION_ID_COUNT 8 + +enum ts_symbol_identifiers { + sym_identifier = 1, + anon_sym_import = 2, + anon_sym_LPAREN = 3, + anon_sym_RPAREN = 4, + anon_sym_if = 5, + anon_sym_else = 6, + anon_sym_foreach = 7, + anon_sym_COMMA = 8, + anon_sym_LBRACE = 9, + anon_sym_RBRACE = 10, + anon_sym_EQ = 11, + anon_sym_PLUS_EQ = 12, + anon_sym_DASH_EQ = 13, + anon_sym_BANG = 14, + anon_sym_PLUS = 15, + anon_sym_DASH = 16, + anon_sym_LT = 17, + anon_sym_LT_EQ = 18, + anon_sym_GT = 19, + anon_sym_GT_EQ = 20, + anon_sym_EQ_EQ = 21, + anon_sym_BANG_EQ = 22, + anon_sym_AMP_AMP = 23, + anon_sym_PIPE_PIPE = 24, + anon_sym_LBRACK = 25, + anon_sym_RBRACK = 26, + anon_sym_DOT = 27, + anon_sym_DQUOTE = 28, + sym_escape_sequence = 29, + anon_sym_DOLLAR = 30, + anon_sym_DOLLAR_LBRACE = 31, + sym_integer = 32, + sym_hex = 33, + anon_sym_true = 34, + anon_sym_false = 35, + sym_comment = 36, + sym__string_content = 37, + sym_source_file = 38, + sym_statement = 39, + sym_import_statement = 40, + sym_if_statement = 41, + sym_else_statement = 42, + sym_foreach_statement = 43, + sym_block = 44, + sym_assignment_statement = 45, + sym_expression = 46, + sym_primary_expression = 47, + sym_unary_expression = 48, + sym_binary_expression = 49, + sym_call_expression = 50, + sym_array_access = 51, + sym_scope_access = 52, + sym_parenthesized_expression = 53, + sym_list = 54, + sym_string = 55, + sym_string_content = 56, + sym_expansion = 57, + sym_boolean = 58, + aux_sym_source_file_repeat1 = 59, + aux_sym_if_statement_repeat1 = 60, + aux_sym_call_expression_repeat1 = 61, + aux_sym_string_content_repeat1 = 62, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym_identifier] = "identifier", + [anon_sym_import] = "import", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_if] = "if", + [anon_sym_else] = "else", + [anon_sym_foreach] = "foreach", + [anon_sym_COMMA] = ",", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_EQ] = "=", + [anon_sym_PLUS_EQ] = "+=", + [anon_sym_DASH_EQ] = "-=", + [anon_sym_BANG] = "!", + [anon_sym_PLUS] = "+", + [anon_sym_DASH] = "-", + [anon_sym_LT] = "<", + [anon_sym_LT_EQ] = "<=", + [anon_sym_GT] = ">", + [anon_sym_GT_EQ] = ">=", + [anon_sym_EQ_EQ] = "==", + [anon_sym_BANG_EQ] = "!=", + [anon_sym_AMP_AMP] = "&&", + [anon_sym_PIPE_PIPE] = "||", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_DOT] = ".", + [anon_sym_DQUOTE] = "\"", + [sym_escape_sequence] = "escape_sequence", + [anon_sym_DOLLAR] = "$", + [anon_sym_DOLLAR_LBRACE] = "${", + [sym_integer] = "integer", + [sym_hex] = "hex", + [anon_sym_true] = "true", + [anon_sym_false] = "false", + [sym_comment] = "comment", + [sym__string_content] = "_string_content", + [sym_source_file] = "source_file", + [sym_statement] = "statement", + [sym_import_statement] = "import_statement", + [sym_if_statement] = "if_statement", + [sym_else_statement] = "else_statement", + [sym_foreach_statement] = "foreach_statement", + [sym_block] = "block", + [sym_assignment_statement] = "assignment_statement", + [sym_expression] = "expression", + [sym_primary_expression] = "primary_expression", + [sym_unary_expression] = "unary_expression", + [sym_binary_expression] = "binary_expression", + [sym_call_expression] = "call_expression", + [sym_array_access] = "array_access", + [sym_scope_access] = "scope_access", + [sym_parenthesized_expression] = "parenthesized_expression", + [sym_list] = "list", + [sym_string] = "string", + [sym_string_content] = "string_content", + [sym_expansion] = "expansion", + [sym_boolean] = "boolean", + [aux_sym_source_file_repeat1] = "source_file_repeat1", + [aux_sym_if_statement_repeat1] = "if_statement_repeat1", + [aux_sym_call_expression_repeat1] = "call_expression_repeat1", + [aux_sym_string_content_repeat1] = "string_content_repeat1", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym_identifier] = sym_identifier, + [anon_sym_import] = anon_sym_import, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_if] = anon_sym_if, + [anon_sym_else] = anon_sym_else, + [anon_sym_foreach] = anon_sym_foreach, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_PLUS_EQ] = anon_sym_PLUS_EQ, + [anon_sym_DASH_EQ] = anon_sym_DASH_EQ, + [anon_sym_BANG] = anon_sym_BANG, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, + [anon_sym_AMP_AMP] = anon_sym_AMP_AMP, + [anon_sym_PIPE_PIPE] = anon_sym_PIPE_PIPE, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_DQUOTE] = anon_sym_DQUOTE, + [sym_escape_sequence] = sym_escape_sequence, + [anon_sym_DOLLAR] = anon_sym_DOLLAR, + [anon_sym_DOLLAR_LBRACE] = anon_sym_DOLLAR_LBRACE, + [sym_integer] = sym_integer, + [sym_hex] = sym_hex, + [anon_sym_true] = anon_sym_true, + [anon_sym_false] = anon_sym_false, + [sym_comment] = sym_comment, + [sym__string_content] = sym__string_content, + [sym_source_file] = sym_source_file, + [sym_statement] = sym_statement, + [sym_import_statement] = sym_import_statement, + [sym_if_statement] = sym_if_statement, + [sym_else_statement] = sym_else_statement, + [sym_foreach_statement] = sym_foreach_statement, + [sym_block] = sym_block, + [sym_assignment_statement] = sym_assignment_statement, + [sym_expression] = sym_expression, + [sym_primary_expression] = sym_primary_expression, + [sym_unary_expression] = sym_unary_expression, + [sym_binary_expression] = sym_binary_expression, + [sym_call_expression] = sym_call_expression, + [sym_array_access] = sym_array_access, + [sym_scope_access] = sym_scope_access, + [sym_parenthesized_expression] = sym_parenthesized_expression, + [sym_list] = sym_list, + [sym_string] = sym_string, + [sym_string_content] = sym_string_content, + [sym_expansion] = sym_expansion, + [sym_boolean] = sym_boolean, + [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, + [aux_sym_if_statement_repeat1] = aux_sym_if_statement_repeat1, + [aux_sym_call_expression_repeat1] = aux_sym_call_expression_repeat1, + [aux_sym_string_content_repeat1] = aux_sym_string_content_repeat1, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [anon_sym_import] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_foreach] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_DQUOTE] = { + .visible = true, + .named = false, + }, + [sym_escape_sequence] = { + .visible = true, + .named = true, + }, + [anon_sym_DOLLAR] = { + .visible = true, + .named = false, + }, + [anon_sym_DOLLAR_LBRACE] = { + .visible = true, + .named = false, + }, + [sym_integer] = { + .visible = true, + .named = true, + }, + [sym_hex] = { + .visible = true, + .named = true, + }, + [anon_sym_true] = { + .visible = true, + .named = false, + }, + [anon_sym_false] = { + .visible = true, + .named = false, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [sym__string_content] = { + .visible = false, + .named = true, + }, + [sym_source_file] = { + .visible = true, + .named = true, + }, + [sym_statement] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_import_statement] = { + .visible = true, + .named = true, + }, + [sym_if_statement] = { + .visible = true, + .named = true, + }, + [sym_else_statement] = { + .visible = true, + .named = true, + }, + [sym_foreach_statement] = { + .visible = true, + .named = true, + }, + [sym_block] = { + .visible = true, + .named = true, + }, + [sym_assignment_statement] = { + .visible = true, + .named = true, + }, + [sym_expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_primary_expression] = { + .visible = true, + .named = true, + }, + [sym_unary_expression] = { + .visible = true, + .named = true, + }, + [sym_binary_expression] = { + .visible = true, + .named = true, + }, + [sym_call_expression] = { + .visible = true, + .named = true, + }, + [sym_array_access] = { + .visible = true, + .named = true, + }, + [sym_scope_access] = { + .visible = true, + .named = true, + }, + [sym_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym_list] = { + .visible = true, + .named = true, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [sym_string_content] = { + .visible = true, + .named = true, + }, + [sym_expansion] = { + .visible = true, + .named = true, + }, + [sym_boolean] = { + .visible = true, + .named = true, + }, + [aux_sym_source_file_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_if_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_call_expression_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_string_content_repeat1] = { + .visible = false, + .named = false, + }, +}; + +enum ts_field_identifiers { + field_alternative = 1, + field_array = 2, + field_condition = 3, + field_consequence = 4, + field_field = 5, + field_function = 6, + field_index = 7, + field_item = 8, + field_left = 9, + field_list = 10, + field_operator = 11, + field_right = 12, + field_scope = 13, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_alternative] = "alternative", + [field_array] = "array", + [field_condition] = "condition", + [field_consequence] = "consequence", + [field_field] = "field", + [field_function] = "function", + [field_index] = "index", + [field_item] = "item", + [field_left] = "left", + [field_list] = "list", + [field_operator] = "operator", + [field_right] = "right", + [field_scope] = "scope", +}; + +static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [1] = {.index = 0, .length = 1}, + [2] = {.index = 1, .length = 3}, + [3] = {.index = 4, .length = 2}, + [4] = {.index = 6, .length = 2}, + [5] = {.index = 8, .length = 2}, + [6] = {.index = 10, .length = 1}, + [7] = {.index = 11, .length = 2}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_function, 0}, + [1] = + {field_left, 0}, + {field_operator, 1}, + {field_right, 2}, + [4] = + {field_field, 2}, + {field_scope, 0}, + [6] = + {field_array, 0}, + {field_index, 2}, + [8] = + {field_condition, 2}, + {field_consequence, 4}, + [10] = + {field_alternative, 1}, + [11] = + {field_item, 2}, + {field_list, 4}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 5, + [6] = 3, + [7] = 4, + [8] = 5, + [9] = 5, + [10] = 3, + [11] = 11, + [12] = 12, + [13] = 13, + [14] = 13, + [15] = 15, + [16] = 11, + [17] = 12, + [18] = 15, + [19] = 19, + [20] = 19, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 21, + [25] = 23, + [26] = 22, + [27] = 27, + [28] = 28, + [29] = 28, + [30] = 27, + [31] = 31, + [32] = 32, + [33] = 33, + [34] = 34, + [35] = 35, + [36] = 36, + [37] = 35, + [38] = 36, + [39] = 34, + [40] = 31, + [41] = 41, + [42] = 42, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 46, + [47] = 47, + [48] = 48, + [49] = 49, + [50] = 50, + [51] = 51, + [52] = 33, + [53] = 43, + [54] = 54, + [55] = 48, + [56] = 56, + [57] = 57, + [58] = 42, + [59] = 59, + [60] = 45, + [61] = 44, + [62] = 46, + [63] = 47, + [64] = 49, + [65] = 51, + [66] = 66, + [67] = 50, + [68] = 32, + [69] = 54, + [70] = 56, + [71] = 66, + [72] = 41, + [73] = 59, + [74] = 57, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 79, + [81] = 77, + [82] = 75, + [83] = 83, + [84] = 83, + [85] = 78, + [86] = 77, + [87] = 79, + [88] = 75, + [89] = 76, + [90] = 76, + [91] = 83, + [92] = 78, + [93] = 93, + [94] = 94, + [95] = 95, + [96] = 96, + [97] = 97, + [98] = 98, + [99] = 95, + [100] = 95, + [101] = 101, + [102] = 97, + [103] = 98, + [104] = 104, + [105] = 101, + [106] = 106, + [107] = 107, + [108] = 94, + [109] = 93, + [110] = 104, + [111] = 98, + [112] = 97, + [113] = 104, + [114] = 101, + [115] = 93, + [116] = 94, + [117] = 96, + [118] = 118, + [119] = 119, + [120] = 120, + [121] = 119, + [122] = 106, + [123] = 107, + [124] = 23, + [125] = 19, + [126] = 22, + [127] = 28, + [128] = 128, + [129] = 129, + [130] = 130, + [131] = 130, + [132] = 13, + [133] = 11, + [134] = 128, + [135] = 31, + [136] = 129, + [137] = 137, + [138] = 49, + [139] = 56, + [140] = 48, + [141] = 141, + [142] = 54, + [143] = 57, + [144] = 45, + [145] = 33, + [146] = 21, + [147] = 66, + [148] = 32, + [149] = 46, + [150] = 47, + [151] = 59, + [152] = 152, + [153] = 141, + [154] = 51, + [155] = 137, + [156] = 34, + [157] = 35, + [158] = 36, + [159] = 27, + [160] = 41, + [161] = 141, + [162] = 42, + [163] = 43, + [164] = 137, + [165] = 165, + [166] = 166, + [167] = 165, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 172, + [173] = 169, + [174] = 174, + [175] = 175, + [176] = 169, + [177] = 175, + [178] = 174, + [179] = 172, + [180] = 180, + [181] = 170, + [182] = 182, + [183] = 180, + [184] = 182, + [185] = 171, + [186] = 175, + [187] = 187, + [188] = 187, + [189] = 187, + [190] = 190, + [191] = 190, + [192] = 190, + [193] = 193, + [194] = 194, + [195] = 195, + [196] = 196, + [197] = 197, + [198] = 197, + [199] = 199, + [200] = 200, + [201] = 201, + [202] = 201, + [203] = 200, + [204] = 201, + [205] = 200, + [206] = 206, + [207] = 207, + [208] = 206, + [209] = 209, + [210] = 207, + [211] = 211, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 215, + [217] = 213, + [218] = 218, + [219] = 215, + [220] = 213, + [221] = 211, + [222] = 222, + [223] = 223, + [224] = 223, + [225] = 214, + [226] = 212, + [227] = 222, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + switch (state) { + case 0: + if (eof) ADVANCE(9); + if (lookahead == '!') ADVANCE(18); + if (lookahead == '"') ADVANCE(34); + if (lookahead == '#') ADVANCE(41); + if (lookahead == '$') ADVANCE(36); + if (lookahead == '&') ADVANCE(2); + if (lookahead == '(') ADVANCE(10); + if (lookahead == ')') ADVANCE(11); + if (lookahead == '+') ADVANCE(20); + if (lookahead == ',') ADVANCE(12); + if (lookahead == '-') ADVANCE(22); + if (lookahead == '.') ADVANCE(33); + if (lookahead == '<') ADVANCE(23); + if (lookahead == '=') ADVANCE(15); + if (lookahead == '>') ADVANCE(25); + if (lookahead == '[') ADVANCE(31); + if (lookahead == '\\') ADVANCE(7); + if (lookahead == ']') ADVANCE(32); + if (lookahead == '{') ADVANCE(13); + if (lookahead == '|') ADVANCE(6); + if (lookahead == '}') ADVANCE(14); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(38); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); + END_STATE(); + case 1: + if (lookahead == '!') ADVANCE(3); + if (lookahead == '#') ADVANCE(41); + if (lookahead == '&') ADVANCE(2); + if (lookahead == '(') ADVANCE(10); + if (lookahead == ')') ADVANCE(11); + if (lookahead == '+') ADVANCE(19); + if (lookahead == ',') ADVANCE(12); + if (lookahead == '-') ADVANCE(21); + if (lookahead == '.') ADVANCE(33); + if (lookahead == '0') ADVANCE(5); + if (lookahead == '<') ADVANCE(23); + if (lookahead == '=') ADVANCE(4); + if (lookahead == '>') ADVANCE(25); + if (lookahead == '[') ADVANCE(31); + if (lookahead == ']') ADVANCE(32); + if (lookahead == '{') ADVANCE(13); + if (lookahead == '|') ADVANCE(6); + if (lookahead == '}') ADVANCE(14); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(1); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); + END_STATE(); + case 2: + if (lookahead == '&') ADVANCE(29); + END_STATE(); + case 3: + if (lookahead == '=') ADVANCE(28); + END_STATE(); + case 4: + if (lookahead == '=') ADVANCE(27); + END_STATE(); + case 5: + if (lookahead == 'x') ADVANCE(8); + END_STATE(); + case 6: + if (lookahead == '|') ADVANCE(30); + END_STATE(); + case 7: + if (lookahead == '"' || + lookahead == '$' || + lookahead == '\\') ADVANCE(35); + END_STATE(); + case 8: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(39); + END_STATE(); + case 9: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 10: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 11: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 12: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 13: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 14: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 15: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(27); + END_STATE(); + case 16: + ACCEPT_TOKEN(anon_sym_PLUS_EQ); + END_STATE(); + case 17: + ACCEPT_TOKEN(anon_sym_DASH_EQ); + END_STATE(); + case 18: + ACCEPT_TOKEN(anon_sym_BANG); + if (lookahead == '=') ADVANCE(28); + END_STATE(); + case 19: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 20: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '=') ADVANCE(16); + END_STATE(); + case 21: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 22: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '=') ADVANCE(17); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(38); + END_STATE(); + case 23: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '=') ADVANCE(24); + END_STATE(); + case 24: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 25: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(26); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 27: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 28: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_AMP_AMP); + END_STATE(); + case 30: + ACCEPT_TOKEN(anon_sym_PIPE_PIPE); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 32: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 33: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 34: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 35: + ACCEPT_TOKEN(sym_escape_sequence); + END_STATE(); + case 36: + ACCEPT_TOKEN(anon_sym_DOLLAR); + if (lookahead == '{') ADVANCE(37); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_DOLLAR_LBRACE); + END_STATE(); + case 38: + ACCEPT_TOKEN(sym_integer); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(38); + END_STATE(); + case 39: + ACCEPT_TOKEN(sym_hex); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(39); + END_STATE(); + case 40: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(40); + END_STATE(); + case 41: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(41); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + switch (state) { + case 0: + if (lookahead == 'e') ADVANCE(1); + if (lookahead == 'f') ADVANCE(2); + if (lookahead == 'i') ADVANCE(3); + if (lookahead == 't') ADVANCE(4); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + END_STATE(); + case 1: + if (lookahead == 'l') ADVANCE(5); + END_STATE(); + case 2: + if (lookahead == 'a') ADVANCE(6); + if (lookahead == 'o') ADVANCE(7); + END_STATE(); + case 3: + if (lookahead == 'f') ADVANCE(8); + if (lookahead == 'm') ADVANCE(9); + END_STATE(); + case 4: + if (lookahead == 'r') ADVANCE(10); + END_STATE(); + case 5: + if (lookahead == 's') ADVANCE(11); + END_STATE(); + case 6: + if (lookahead == 'l') ADVANCE(12); + END_STATE(); + case 7: + if (lookahead == 'r') ADVANCE(13); + END_STATE(); + case 8: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 9: + if (lookahead == 'p') ADVANCE(14); + END_STATE(); + case 10: + if (lookahead == 'u') ADVANCE(15); + END_STATE(); + case 11: + if (lookahead == 'e') ADVANCE(16); + END_STATE(); + case 12: + if (lookahead == 's') ADVANCE(17); + END_STATE(); + case 13: + if (lookahead == 'e') ADVANCE(18); + END_STATE(); + case 14: + if (lookahead == 'o') ADVANCE(19); + END_STATE(); + case 15: + if (lookahead == 'e') ADVANCE(20); + END_STATE(); + case 16: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 17: + if (lookahead == 'e') ADVANCE(21); + END_STATE(); + case 18: + if (lookahead == 'a') ADVANCE(22); + END_STATE(); + case 19: + if (lookahead == 'r') ADVANCE(23); + END_STATE(); + case 20: + ACCEPT_TOKEN(anon_sym_true); + END_STATE(); + case 21: + ACCEPT_TOKEN(anon_sym_false); + END_STATE(); + case 22: + if (lookahead == 'c') ADVANCE(24); + END_STATE(); + case 23: + if (lookahead == 't') ADVANCE(25); + END_STATE(); + case 24: + if (lookahead == 'h') ADVANCE(26); + END_STATE(); + case 25: + ACCEPT_TOKEN(anon_sym_import); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_foreach); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0, .external_lex_state = 1}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 0}, + [3] = {.lex_state = 0}, + [4] = {.lex_state = 0}, + [5] = {.lex_state = 0}, + [6] = {.lex_state = 0}, + [7] = {.lex_state = 0}, + [8] = {.lex_state = 0}, + [9] = {.lex_state = 0}, + [10] = {.lex_state = 0}, + [11] = {.lex_state = 0}, + [12] = {.lex_state = 0}, + [13] = {.lex_state = 0}, + [14] = {.lex_state = 0}, + [15] = {.lex_state = 0}, + [16] = {.lex_state = 0}, + [17] = {.lex_state = 0}, + [18] = {.lex_state = 0}, + [19] = {.lex_state = 0}, + [20] = {.lex_state = 0}, + [21] = {.lex_state = 0}, + [22] = {.lex_state = 0}, + [23] = {.lex_state = 0}, + [24] = {.lex_state = 0}, + [25] = {.lex_state = 0}, + [26] = {.lex_state = 0}, + [27] = {.lex_state = 0}, + [28] = {.lex_state = 0}, + [29] = {.lex_state = 0}, + [30] = {.lex_state = 0}, + [31] = {.lex_state = 0}, + [32] = {.lex_state = 0}, + [33] = {.lex_state = 0}, + [34] = {.lex_state = 0}, + [35] = {.lex_state = 0}, + [36] = {.lex_state = 0}, + [37] = {.lex_state = 0}, + [38] = {.lex_state = 0}, + [39] = {.lex_state = 0}, + [40] = {.lex_state = 0}, + [41] = {.lex_state = 0}, + [42] = {.lex_state = 0}, + [43] = {.lex_state = 0}, + [44] = {.lex_state = 0}, + [45] = {.lex_state = 0}, + [46] = {.lex_state = 0}, + [47] = {.lex_state = 0}, + [48] = {.lex_state = 0}, + [49] = {.lex_state = 0}, + [50] = {.lex_state = 0}, + [51] = {.lex_state = 0}, + [52] = {.lex_state = 0}, + [53] = {.lex_state = 0}, + [54] = {.lex_state = 0}, + [55] = {.lex_state = 0}, + [56] = {.lex_state = 0}, + [57] = {.lex_state = 0}, + [58] = {.lex_state = 0}, + [59] = {.lex_state = 0}, + [60] = {.lex_state = 0}, + [61] = {.lex_state = 0}, + [62] = {.lex_state = 0}, + [63] = {.lex_state = 0}, + [64] = {.lex_state = 0}, + [65] = {.lex_state = 0}, + [66] = {.lex_state = 0}, + [67] = {.lex_state = 0}, + [68] = {.lex_state = 0}, + [69] = {.lex_state = 0}, + [70] = {.lex_state = 0}, + [71] = {.lex_state = 0}, + [72] = {.lex_state = 0}, + [73] = {.lex_state = 0}, + [74] = {.lex_state = 0}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 0}, + [77] = {.lex_state = 0}, + [78] = {.lex_state = 0}, + [79] = {.lex_state = 0}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 0}, + [82] = {.lex_state = 0}, + [83] = {.lex_state = 0}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 0}, + [86] = {.lex_state = 0}, + [87] = {.lex_state = 0}, + [88] = {.lex_state = 0}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 0}, + [91] = {.lex_state = 0}, + [92] = {.lex_state = 0}, + [93] = {.lex_state = 0}, + [94] = {.lex_state = 0}, + [95] = {.lex_state = 0}, + [96] = {.lex_state = 0}, + [97] = {.lex_state = 0}, + [98] = {.lex_state = 0}, + [99] = {.lex_state = 0}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 0}, + [102] = {.lex_state = 0}, + [103] = {.lex_state = 0}, + [104] = {.lex_state = 0}, + [105] = {.lex_state = 0}, + [106] = {.lex_state = 0}, + [107] = {.lex_state = 0}, + [108] = {.lex_state = 0}, + [109] = {.lex_state = 0}, + [110] = {.lex_state = 0}, + [111] = {.lex_state = 0}, + [112] = {.lex_state = 0}, + [113] = {.lex_state = 0}, + [114] = {.lex_state = 0}, + [115] = {.lex_state = 0}, + [116] = {.lex_state = 0}, + [117] = {.lex_state = 0}, + [118] = {.lex_state = 0}, + [119] = {.lex_state = 0}, + [120] = {.lex_state = 0}, + [121] = {.lex_state = 0}, + [122] = {.lex_state = 0}, + [123] = {.lex_state = 0}, + [124] = {.lex_state = 1}, + [125] = {.lex_state = 1}, + [126] = {.lex_state = 1}, + [127] = {.lex_state = 1}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 0}, + [131] = {.lex_state = 0}, + [132] = {.lex_state = 1}, + [133] = {.lex_state = 1}, + [134] = {.lex_state = 0}, + [135] = {.lex_state = 1}, + [136] = {.lex_state = 0}, + [137] = {.lex_state = 1}, + [138] = {.lex_state = 1}, + [139] = {.lex_state = 1}, + [140] = {.lex_state = 1}, + [141] = {.lex_state = 1}, + [142] = {.lex_state = 1}, + [143] = {.lex_state = 1}, + [144] = {.lex_state = 1}, + [145] = {.lex_state = 1}, + [146] = {.lex_state = 1}, + [147] = {.lex_state = 1}, + [148] = {.lex_state = 1}, + [149] = {.lex_state = 1}, + [150] = {.lex_state = 1}, + [151] = {.lex_state = 1}, + [152] = {.lex_state = 1}, + [153] = {.lex_state = 1}, + [154] = {.lex_state = 1}, + [155] = {.lex_state = 1}, + [156] = {.lex_state = 1}, + [157] = {.lex_state = 1}, + [158] = {.lex_state = 1}, + [159] = {.lex_state = 1}, + [160] = {.lex_state = 1}, + [161] = {.lex_state = 1}, + [162] = {.lex_state = 1}, + [163] = {.lex_state = 1}, + [164] = {.lex_state = 1}, + [165] = {.lex_state = 0}, + [166] = {.lex_state = 1}, + [167] = {.lex_state = 0}, + [168] = {.lex_state = 1}, + [169] = {.lex_state = 1}, + [170] = {.lex_state = 1}, + [171] = {.lex_state = 1}, + [172] = {.lex_state = 0}, + [173] = {.lex_state = 1}, + [174] = {.lex_state = 0}, + [175] = {.lex_state = 1}, + [176] = {.lex_state = 1}, + [177] = {.lex_state = 1}, + [178] = {.lex_state = 0}, + [179] = {.lex_state = 0}, + [180] = {.lex_state = 0}, + [181] = {.lex_state = 1}, + [182] = {.lex_state = 1}, + [183] = {.lex_state = 0}, + [184] = {.lex_state = 1}, + [185] = {.lex_state = 1}, + [186] = {.lex_state = 1}, + [187] = {.lex_state = 1}, + [188] = {.lex_state = 1}, + [189] = {.lex_state = 1}, + [190] = {.lex_state = 0, .external_lex_state = 1}, + [191] = {.lex_state = 0, .external_lex_state = 1}, + [192] = {.lex_state = 0, .external_lex_state = 1}, + [193] = {.lex_state = 0, .external_lex_state = 1}, + [194] = {.lex_state = 0, .external_lex_state = 1}, + [195] = {.lex_state = 0, .external_lex_state = 1}, + [196] = {.lex_state = 0, .external_lex_state = 1}, + [197] = {.lex_state = 0}, + [198] = {.lex_state = 0}, + [199] = {.lex_state = 0}, + [200] = {.lex_state = 0}, + [201] = {.lex_state = 0}, + [202] = {.lex_state = 0}, + [203] = {.lex_state = 0}, + [204] = {.lex_state = 0}, + [205] = {.lex_state = 0}, + [206] = {.lex_state = 0}, + [207] = {.lex_state = 0}, + [208] = {.lex_state = 0}, + [209] = {.lex_state = 1}, + [210] = {.lex_state = 0}, + [211] = {.lex_state = 0}, + [212] = {.lex_state = 0}, + [213] = {.lex_state = 0}, + [214] = {.lex_state = 0}, + [215] = {.lex_state = 0}, + [216] = {.lex_state = 0}, + [217] = {.lex_state = 0}, + [218] = {.lex_state = 0}, + [219] = {.lex_state = 0}, + [220] = {.lex_state = 0}, + [221] = {.lex_state = 0}, + [222] = {.lex_state = 0}, + [223] = {.lex_state = 0}, + [224] = {.lex_state = 0}, + [225] = {.lex_state = 0}, + [226] = {.lex_state = 0}, + [227] = {.lex_state = 0}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [sym_identifier] = ACTIONS(1), + [anon_sym_import] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_foreach] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_PLUS_EQ] = ACTIONS(1), + [anon_sym_DASH_EQ] = ACTIONS(1), + [anon_sym_BANG] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_AMP_AMP] = ACTIONS(1), + [anon_sym_PIPE_PIPE] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_DQUOTE] = ACTIONS(1), + [sym_escape_sequence] = ACTIONS(1), + [anon_sym_DOLLAR] = ACTIONS(1), + [anon_sym_DOLLAR_LBRACE] = ACTIONS(1), + [sym_integer] = ACTIONS(1), + [anon_sym_true] = ACTIONS(1), + [anon_sym_false] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + [sym__string_content] = ACTIONS(1), + }, + [1] = { + [sym_source_file] = STATE(218), + [sym_statement] = STATE(2), + [sym_import_statement] = STATE(172), + [sym_if_statement] = STATE(172), + [sym_foreach_statement] = STATE(172), + [sym_block] = STATE(53), + [sym_assignment_statement] = STATE(172), + [sym_expression] = STATE(67), + [sym_primary_expression] = STATE(72), + [sym_unary_expression] = STATE(72), + [sym_binary_expression] = STATE(72), + [sym_call_expression] = STATE(53), + [sym_array_access] = STATE(15), + [sym_scope_access] = STATE(15), + [sym_parenthesized_expression] = STATE(53), + [sym_list] = STATE(53), + [sym_string] = STATE(53), + [sym_boolean] = STATE(53), + [aux_sym_source_file_repeat1] = STATE(2), + [ts_builtin_sym_end] = ACTIONS(5), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_LPAREN] = ACTIONS(11), + [anon_sym_if] = ACTIONS(13), + [anon_sym_foreach] = ACTIONS(15), + [anon_sym_LBRACE] = ACTIONS(17), + [anon_sym_BANG] = ACTIONS(19), + [anon_sym_LBRACK] = ACTIONS(21), + [anon_sym_DQUOTE] = ACTIONS(23), + [sym_integer] = ACTIONS(25), + [anon_sym_true] = ACTIONS(27), + [anon_sym_false] = ACTIONS(27), + [sym_comment] = ACTIONS(3), + }, + [2] = { + [sym_statement] = STATE(7), + [sym_import_statement] = STATE(172), + [sym_if_statement] = STATE(172), + [sym_foreach_statement] = STATE(172), + [sym_block] = STATE(53), + [sym_assignment_statement] = STATE(172), + [sym_expression] = STATE(67), + [sym_primary_expression] = STATE(72), + [sym_unary_expression] = STATE(72), + [sym_binary_expression] = STATE(72), + [sym_call_expression] = STATE(53), + [sym_array_access] = STATE(15), + [sym_scope_access] = STATE(15), + [sym_parenthesized_expression] = STATE(53), + [sym_list] = STATE(53), + [sym_string] = STATE(53), + [sym_boolean] = STATE(53), + [aux_sym_source_file_repeat1] = STATE(7), + [ts_builtin_sym_end] = ACTIONS(29), + [sym_identifier] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_LPAREN] = ACTIONS(11), + [anon_sym_if] = ACTIONS(13), + [anon_sym_foreach] = ACTIONS(15), + [anon_sym_LBRACE] = ACTIONS(17), + [anon_sym_BANG] = ACTIONS(19), + [anon_sym_LBRACK] = ACTIONS(21), + [anon_sym_DQUOTE] = ACTIONS(23), + [sym_integer] = ACTIONS(25), + [anon_sym_true] = ACTIONS(27), + [anon_sym_false] = ACTIONS(27), + [sym_comment] = ACTIONS(3), + }, + [3] = { + [sym_statement] = STATE(9), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(9), + [sym_identifier] = ACTIONS(31), + [anon_sym_import] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_if] = ACTIONS(37), + [anon_sym_foreach] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_RBRACE] = ACTIONS(43), + [anon_sym_BANG] = ACTIONS(45), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_DQUOTE] = ACTIONS(49), + [sym_integer] = ACTIONS(51), + [anon_sym_true] = ACTIONS(53), + [anon_sym_false] = ACTIONS(53), + [sym_comment] = ACTIONS(3), + }, + [4] = { + [sym_statement] = STATE(4), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(4), + [sym_identifier] = ACTIONS(55), + [anon_sym_import] = ACTIONS(58), + [anon_sym_LPAREN] = ACTIONS(61), + [anon_sym_if] = ACTIONS(64), + [anon_sym_foreach] = ACTIONS(67), + [anon_sym_LBRACE] = ACTIONS(70), + [anon_sym_RBRACE] = ACTIONS(73), + [anon_sym_BANG] = ACTIONS(75), + [anon_sym_LBRACK] = ACTIONS(78), + [anon_sym_DQUOTE] = ACTIONS(81), + [sym_integer] = ACTIONS(84), + [anon_sym_true] = ACTIONS(87), + [anon_sym_false] = ACTIONS(87), + [sym_comment] = ACTIONS(3), + }, + [5] = { + [sym_statement] = STATE(4), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(4), + [sym_identifier] = ACTIONS(31), + [anon_sym_import] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_if] = ACTIONS(37), + [anon_sym_foreach] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_RBRACE] = ACTIONS(90), + [anon_sym_BANG] = ACTIONS(45), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_DQUOTE] = ACTIONS(49), + [sym_integer] = ACTIONS(51), + [anon_sym_true] = ACTIONS(53), + [anon_sym_false] = ACTIONS(53), + [sym_comment] = ACTIONS(3), + }, + [6] = { + [sym_statement] = STATE(8), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(8), + [sym_identifier] = ACTIONS(31), + [anon_sym_import] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_if] = ACTIONS(37), + [anon_sym_foreach] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_RBRACE] = ACTIONS(92), + [anon_sym_BANG] = ACTIONS(45), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_DQUOTE] = ACTIONS(49), + [sym_integer] = ACTIONS(51), + [anon_sym_true] = ACTIONS(53), + [anon_sym_false] = ACTIONS(53), + [sym_comment] = ACTIONS(3), + }, + [7] = { + [sym_statement] = STATE(7), + [sym_import_statement] = STATE(172), + [sym_if_statement] = STATE(172), + [sym_foreach_statement] = STATE(172), + [sym_block] = STATE(53), + [sym_assignment_statement] = STATE(172), + [sym_expression] = STATE(67), + [sym_primary_expression] = STATE(72), + [sym_unary_expression] = STATE(72), + [sym_binary_expression] = STATE(72), + [sym_call_expression] = STATE(53), + [sym_array_access] = STATE(15), + [sym_scope_access] = STATE(15), + [sym_parenthesized_expression] = STATE(53), + [sym_list] = STATE(53), + [sym_string] = STATE(53), + [sym_boolean] = STATE(53), + [aux_sym_source_file_repeat1] = STATE(7), + [ts_builtin_sym_end] = ACTIONS(73), + [sym_identifier] = ACTIONS(94), + [anon_sym_import] = ACTIONS(97), + [anon_sym_LPAREN] = ACTIONS(100), + [anon_sym_if] = ACTIONS(103), + [anon_sym_foreach] = ACTIONS(106), + [anon_sym_LBRACE] = ACTIONS(109), + [anon_sym_BANG] = ACTIONS(112), + [anon_sym_LBRACK] = ACTIONS(115), + [anon_sym_DQUOTE] = ACTIONS(118), + [sym_integer] = ACTIONS(121), + [anon_sym_true] = ACTIONS(124), + [anon_sym_false] = ACTIONS(124), + [sym_comment] = ACTIONS(3), + }, + [8] = { + [sym_statement] = STATE(4), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(4), + [sym_identifier] = ACTIONS(31), + [anon_sym_import] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_if] = ACTIONS(37), + [anon_sym_foreach] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_RBRACE] = ACTIONS(127), + [anon_sym_BANG] = ACTIONS(45), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_DQUOTE] = ACTIONS(49), + [sym_integer] = ACTIONS(51), + [anon_sym_true] = ACTIONS(53), + [anon_sym_false] = ACTIONS(53), + [sym_comment] = ACTIONS(3), + }, + [9] = { + [sym_statement] = STATE(4), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(4), + [sym_identifier] = ACTIONS(31), + [anon_sym_import] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_if] = ACTIONS(37), + [anon_sym_foreach] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_RBRACE] = ACTIONS(129), + [anon_sym_BANG] = ACTIONS(45), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_DQUOTE] = ACTIONS(49), + [sym_integer] = ACTIONS(51), + [anon_sym_true] = ACTIONS(53), + [anon_sym_false] = ACTIONS(53), + [sym_comment] = ACTIONS(3), + }, + [10] = { + [sym_statement] = STATE(5), + [sym_import_statement] = STATE(179), + [sym_if_statement] = STATE(179), + [sym_foreach_statement] = STATE(179), + [sym_block] = STATE(43), + [sym_assignment_statement] = STATE(179), + [sym_expression] = STATE(50), + [sym_primary_expression] = STATE(41), + [sym_unary_expression] = STATE(41), + [sym_binary_expression] = STATE(41), + [sym_call_expression] = STATE(43), + [sym_array_access] = STATE(18), + [sym_scope_access] = STATE(18), + [sym_parenthesized_expression] = STATE(43), + [sym_list] = STATE(43), + [sym_string] = STATE(43), + [sym_boolean] = STATE(43), + [aux_sym_source_file_repeat1] = STATE(5), + [sym_identifier] = ACTIONS(31), + [anon_sym_import] = ACTIONS(33), + [anon_sym_LPAREN] = ACTIONS(35), + [anon_sym_if] = ACTIONS(37), + [anon_sym_foreach] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_RBRACE] = ACTIONS(131), + [anon_sym_BANG] = ACTIONS(45), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_DQUOTE] = ACTIONS(49), + [sym_integer] = ACTIONS(51), + [anon_sym_true] = ACTIONS(53), + [anon_sym_false] = ACTIONS(53), + [sym_comment] = ACTIONS(3), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 12, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_EQ, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(133), 15, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [35] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(141), 1, + anon_sym_LPAREN, + ACTIONS(143), 1, + anon_sym_EQ, + ACTIONS(145), 2, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + ACTIONS(139), 11, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 12, + ts_builtin_sym_end, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [76] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(147), 12, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_EQ, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(149), 15, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [111] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(147), 12, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_EQ, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(149), 15, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [146] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(143), 1, + anon_sym_EQ, + ACTIONS(145), 2, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + ACTIONS(139), 11, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 13, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [185] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 12, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_EQ, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(133), 15, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [220] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(151), 1, + anon_sym_LPAREN, + ACTIONS(153), 1, + anon_sym_EQ, + ACTIONS(155), 2, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + ACTIONS(139), 11, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 12, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [261] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(153), 1, + anon_sym_EQ, + ACTIONS(155), 2, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + ACTIONS(139), 11, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 13, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [300] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(59), 1, + sym_block, + ACTIONS(159), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(157), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [335] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(73), 1, + sym_block, + ACTIONS(159), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(157), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [370] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 11, + anon_sym_import, + anon_sym_if, + anon_sym_else, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(163), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [403] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(32), 1, + sym_block, + ACTIONS(167), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(165), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [438] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(70), 1, + sym_block, + ACTIONS(169), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(171), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [473] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 11, + anon_sym_import, + anon_sym_if, + anon_sym_else, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(163), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [506] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(56), 1, + sym_block, + ACTIONS(169), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(171), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [541] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(68), 1, + sym_block, + ACTIONS(167), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(165), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [576] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(175), 11, + anon_sym_import, + anon_sym_if, + anon_sym_else, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(173), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [609] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(74), 1, + sym_block, + ACTIONS(179), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(177), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [644] = 4, + ACTIONS(3), 1, + sym_comment, + STATE(57), 1, + sym_block, + ACTIONS(179), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(177), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [679] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(175), 11, + anon_sym_import, + anon_sym_if, + anon_sym_else, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(173), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [712] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(141), 1, + anon_sym_LPAREN, + ACTIONS(139), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 13, + ts_builtin_sym_end, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [746] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(159), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(157), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [778] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(183), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [810] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(185), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(187), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [842] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(189), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(191), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [874] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(195), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(193), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [906] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(189), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(191), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [938] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(195), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(193), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [970] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(185), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(187), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1002] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(151), 1, + anon_sym_LPAREN, + ACTIONS(139), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 13, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1036] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(199), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1068] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(201), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(203), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1100] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(139), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1132] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(215), 1, + anon_sym_AMP_AMP, + ACTIONS(217), 1, + anon_sym_PIPE_PIPE, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(213), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(209), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(211), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(207), 5, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(205), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + [1178] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(223), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(225), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1210] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(227), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(229), 12, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + [1246] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(209), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(211), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(227), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(229), 9, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + [1286] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(231), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(233), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1318] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(213), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(209), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(211), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(227), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(229), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + [1360] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(215), 1, + anon_sym_AMP_AMP, + ACTIONS(217), 1, + anon_sym_PIPE_PIPE, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(213), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(209), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(211), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(237), 5, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(235), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + [1406] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(215), 1, + anon_sym_AMP_AMP, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(213), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(209), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(211), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(229), 6, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(227), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + [1450] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(183), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1482] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(139), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(137), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1514] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(239), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(241), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1546] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(231), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(233), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1578] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(245), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(243), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1610] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(167), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(165), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1642] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(201), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(203), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1674] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(169), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(171), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1706] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(223), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(225), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1738] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + anon_sym_AMP_AMP, + ACTIONS(255), 1, + anon_sym_PIPE_PIPE, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(251), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(247), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(249), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(207), 5, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(205), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + [1784] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(227), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(229), 12, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + [1820] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(247), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(249), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(227), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(229), 9, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + [1860] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(251), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(247), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(249), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(227), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(229), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + [1902] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + anon_sym_AMP_AMP, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(251), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(247), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(249), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(229), 6, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PIPE_PIPE, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(227), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + [1946] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(261), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(263), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [1978] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(253), 1, + anon_sym_AMP_AMP, + ACTIONS(255), 1, + anon_sym_PIPE_PIPE, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(251), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(247), 3, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(249), 3, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + ACTIONS(237), 5, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(235), 7, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_true, + anon_sym_false, + sym_identifier, + [2024] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(159), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(157), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2056] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(239), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(241), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2088] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(245), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(243), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2120] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(261), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(263), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2152] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(199), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2184] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(169), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(171), 14, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2216] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(167), 10, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_BANG, + anon_sym_DASH, + anon_sym_LT, + anon_sym_GT, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(165), 14, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_PLUS, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_DQUOTE, + sym_integer, + [2248] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(275), 1, + anon_sym_RBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2298] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(283), 1, + anon_sym_RBRACK, + STATE(141), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2348] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(285), 1, + anon_sym_RBRACK, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2398] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(287), 1, + anon_sym_RPAREN, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2448] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(289), 1, + anon_sym_RPAREN, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2498] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(291), 1, + anon_sym_RPAREN, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2548] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(293), 1, + anon_sym_RBRACK, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2598] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(295), 1, + anon_sym_RBRACK, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2648] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(297), 1, + anon_sym_RPAREN, + STATE(155), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2698] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(299), 1, + anon_sym_RPAREN, + STATE(137), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2748] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(301), 1, + anon_sym_RPAREN, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2798] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(303), 1, + anon_sym_RBRACK, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2848] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(305), 1, + anon_sym_RPAREN, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2898] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(307), 1, + anon_sym_RBRACK, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2948] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(309), 1, + anon_sym_RBRACK, + STATE(153), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [2998] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(311), 1, + anon_sym_RBRACK, + STATE(161), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3048] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(313), 1, + anon_sym_RPAREN, + STATE(164), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3098] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(315), 1, + anon_sym_RPAREN, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3148] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(19), 1, + anon_sym_BANG, + ACTIONS(21), 1, + anon_sym_LBRACK, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + sym_integer, + ACTIONS(317), 1, + sym_identifier, + STATE(63), 1, + sym_expression, + ACTIONS(27), 2, + anon_sym_true, + anon_sym_false, + STATE(72), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(53), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3195] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(19), 1, + anon_sym_BANG, + ACTIONS(21), 1, + anon_sym_LBRACK, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + sym_integer, + ACTIONS(317), 1, + sym_identifier, + STATE(62), 1, + sym_expression, + ACTIONS(27), 2, + anon_sym_true, + anon_sym_false, + STATE(72), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(53), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3242] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(173), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3289] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(182), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3336] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(186), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3383] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LPAREN, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_BANG, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 1, + anon_sym_DQUOTE, + ACTIONS(51), 1, + sym_integer, + ACTIONS(319), 1, + sym_identifier, + STATE(51), 1, + sym_expression, + ACTIONS(53), 2, + anon_sym_true, + anon_sym_false, + STATE(41), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(43), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3430] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(176), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3477] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(169), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3524] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LPAREN, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 1, + anon_sym_DQUOTE, + ACTIONS(51), 1, + sym_integer, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(319), 1, + sym_identifier, + STATE(38), 1, + sym_primary_expression, + STATE(188), 1, + sym_expression, + ACTIONS(53), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 2, + sym_unary_expression, + sym_binary_expression, + STATE(43), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3573] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(177), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3620] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(19), 1, + anon_sym_BANG, + ACTIONS(21), 1, + anon_sym_LBRACK, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + sym_integer, + ACTIONS(317), 1, + sym_identifier, + STATE(65), 1, + sym_expression, + ACTIONS(27), 2, + anon_sym_true, + anon_sym_false, + STATE(72), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(53), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3667] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(19), 1, + anon_sym_BANG, + ACTIONS(21), 1, + anon_sym_LBRACK, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + sym_integer, + ACTIONS(317), 1, + sym_identifier, + STATE(64), 1, + sym_expression, + ACTIONS(27), 2, + anon_sym_true, + anon_sym_false, + STATE(72), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(53), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3714] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(21), 1, + anon_sym_LBRACK, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + sym_integer, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(317), 1, + sym_identifier, + STATE(36), 1, + sym_primary_expression, + STATE(187), 1, + sym_expression, + ACTIONS(27), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 2, + sym_unary_expression, + sym_binary_expression, + STATE(53), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3763] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(181), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3810] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LPAREN, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_BANG, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 1, + anon_sym_DQUOTE, + ACTIONS(51), 1, + sym_integer, + ACTIONS(319), 1, + sym_identifier, + STATE(44), 1, + sym_expression, + ACTIONS(53), 2, + anon_sym_true, + anon_sym_false, + STATE(41), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(43), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3857] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(149), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3904] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(150), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3951] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(138), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [3998] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(154), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4045] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(175), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4092] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LPAREN, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_BANG, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 1, + anon_sym_DQUOTE, + ACTIONS(51), 1, + sym_integer, + ACTIONS(319), 1, + sym_identifier, + STATE(49), 1, + sym_expression, + ACTIONS(53), 2, + anon_sym_true, + anon_sym_false, + STATE(41), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(43), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4139] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(158), 1, + sym_primary_expression, + STATE(189), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 2, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4188] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LPAREN, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_BANG, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 1, + anon_sym_DQUOTE, + ACTIONS(51), 1, + sym_integer, + ACTIONS(319), 1, + sym_identifier, + STATE(47), 1, + sym_expression, + ACTIONS(53), 2, + anon_sym_true, + anon_sym_false, + STATE(41), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(43), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4235] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(35), 1, + anon_sym_LPAREN, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_BANG, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 1, + anon_sym_DQUOTE, + ACTIONS(51), 1, + sym_integer, + ACTIONS(319), 1, + sym_identifier, + STATE(46), 1, + sym_expression, + ACTIONS(53), 2, + anon_sym_true, + anon_sym_false, + STATE(41), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(43), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4282] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(184), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4329] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(152), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4376] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(171), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4423] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + ACTIONS(321), 1, + sym_identifier, + STATE(189), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(168), 2, + sym_array_access, + sym_scope_access, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 6, + sym_block, + sym_call_expression, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4472] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(185), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4519] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(265), 1, + sym_identifier, + ACTIONS(267), 1, + anon_sym_LPAREN, + ACTIONS(269), 1, + anon_sym_LBRACE, + ACTIONS(271), 1, + anon_sym_BANG, + ACTIONS(273), 1, + anon_sym_LBRACK, + ACTIONS(277), 1, + anon_sym_DQUOTE, + ACTIONS(279), 1, + sym_integer, + STATE(170), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_true, + anon_sym_false, + STATE(160), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(163), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4566] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(19), 1, + anon_sym_BANG, + ACTIONS(21), 1, + anon_sym_LBRACK, + ACTIONS(23), 1, + anon_sym_DQUOTE, + ACTIONS(25), 1, + sym_integer, + ACTIONS(317), 1, + sym_identifier, + STATE(61), 1, + sym_expression, + ACTIONS(27), 2, + anon_sym_true, + anon_sym_false, + STATE(72), 3, + sym_primary_expression, + sym_unary_expression, + sym_binary_expression, + STATE(53), 8, + sym_block, + sym_call_expression, + sym_array_access, + sym_scope_access, + sym_parenthesized_expression, + sym_list, + sym_string, + sym_boolean, + [4613] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(269), 1, + anon_sym_LBRACE, + STATE(139), 1, + sym_block, + ACTIONS(169), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(171), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4642] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(269), 1, + anon_sym_LBRACE, + STATE(151), 1, + sym_block, + ACTIONS(159), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(157), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4671] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(269), 1, + anon_sym_LBRACE, + STATE(148), 1, + sym_block, + ACTIONS(167), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(165), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4700] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(269), 1, + anon_sym_LBRACE, + STATE(143), 1, + sym_block, + ACTIONS(179), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(177), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4729] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(327), 1, + anon_sym_else, + STATE(128), 2, + sym_else_statement, + aux_sym_if_statement_repeat1, + ACTIONS(323), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(325), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [4757] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(334), 1, + anon_sym_else, + STATE(128), 2, + sym_else_statement, + aux_sym_if_statement_repeat1, + ACTIONS(330), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(332), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [4785] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(334), 1, + anon_sym_else, + STATE(129), 2, + sym_else_statement, + aux_sym_if_statement_repeat1, + ACTIONS(336), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(338), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [4813] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(340), 1, + anon_sym_else, + STATE(136), 2, + sym_else_statement, + aux_sym_if_statement_repeat1, + ACTIONS(336), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(338), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [4841] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(147), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(149), 14, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4865] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(133), 14, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4889] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(342), 1, + anon_sym_else, + STATE(134), 2, + sym_else_statement, + aux_sym_if_statement_repeat1, + ACTIONS(323), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(325), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [4917] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(345), 1, + anon_sym_LPAREN, + ACTIONS(139), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(137), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [4943] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(340), 1, + anon_sym_else, + STATE(134), 2, + sym_else_statement, + aux_sym_if_statement_repeat1, + ACTIONS(330), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(332), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [4971] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(347), 1, + anon_sym_RPAREN, + ACTIONS(349), 1, + anon_sym_COMMA, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + STATE(202), 1, + aux_sym_call_expression_repeat1, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5010] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(229), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_RBRACK, + [5041] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(245), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(243), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5064] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(231), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(233), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5087] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(365), 1, + anon_sym_COMMA, + ACTIONS(367), 1, + anon_sym_RBRACK, + STATE(205), 1, + aux_sym_call_expression_repeat1, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5126] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(239), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(241), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5149] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(167), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(165), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5172] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(223), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(225), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5195] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(183), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5218] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(163), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5241] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(261), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(263), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5264] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(159), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(157), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5287] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(227), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(229), 11, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_RBRACK, + [5314] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(229), 7, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_RBRACK, + [5343] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(169), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(171), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5366] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(369), 3, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5401] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(371), 1, + anon_sym_COMMA, + ACTIONS(373), 1, + anon_sym_RBRACK, + STATE(200), 1, + aux_sym_call_expression_repeat1, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5440] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(229), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PIPE_PIPE, + anon_sym_RBRACK, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5473] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(375), 1, + anon_sym_RPAREN, + ACTIONS(377), 1, + anon_sym_COMMA, + STATE(201), 1, + aux_sym_call_expression_repeat1, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5512] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(185), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(187), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5535] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(189), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(191), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5558] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(195), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5581] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(175), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(173), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5604] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(199), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5627] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(379), 1, + anon_sym_COMMA, + ACTIONS(381), 1, + anon_sym_RBRACK, + STATE(203), 1, + aux_sym_call_expression_repeat1, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5666] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(201), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(203), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5689] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(139), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(137), 13, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_DOT, + [5712] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(383), 1, + anon_sym_RPAREN, + ACTIONS(385), 1, + anon_sym_COMMA, + STATE(204), 1, + aux_sym_call_expression_repeat1, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5751] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(387), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(389), 7, + anon_sym_import, + anon_sym_if, + anon_sym_else, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + [5773] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(345), 1, + anon_sym_LPAREN, + ACTIONS(391), 1, + anon_sym_RBRACE, + ACTIONS(139), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(137), 10, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + [5799] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(387), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + ACTIONS(389), 7, + anon_sym_import, + anon_sym_if, + anon_sym_else, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + [5821] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(391), 1, + anon_sym_RBRACE, + ACTIONS(139), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(137), 10, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_AMP_AMP, + anon_sym_PIPE_PIPE, + anon_sym_LBRACK, + anon_sym_DOT, + [5844] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(393), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5877] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(395), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5910] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(397), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5943] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(235), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(237), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [5964] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(399), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [5997] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(403), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(401), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [6018] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(405), 1, + anon_sym_RBRACK, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6051] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(407), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6084] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(409), 1, + anon_sym_RBRACK, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6117] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(403), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(401), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [6138] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(235), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(237), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [6159] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(413), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(411), 7, + ts_builtin_sym_end, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [6180] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(415), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6213] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(417), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6246] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(413), 6, + anon_sym_import, + anon_sym_if, + anon_sym_foreach, + anon_sym_true, + anon_sym_false, + sym_identifier, + ACTIONS(411), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_BANG, + anon_sym_LBRACK, + anon_sym_DQUOTE, + sym_integer, + [6267] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(419), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6300] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(421), 1, + anon_sym_RPAREN, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6333] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(423), 1, + anon_sym_RBRACK, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6366] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(257), 1, + anon_sym_LBRACK, + ACTIONS(259), 1, + anon_sym_DOT, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6396] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(219), 1, + anon_sym_LBRACK, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6426] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_AMP_AMP, + ACTIONS(359), 1, + anon_sym_PIPE_PIPE, + ACTIONS(361), 1, + anon_sym_LBRACK, + ACTIONS(363), 1, + anon_sym_DOT, + ACTIONS(353), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(355), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(351), 4, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [6456] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(425), 1, + anon_sym_DQUOTE, + ACTIONS(429), 1, + anon_sym_DOLLAR, + ACTIONS(431), 1, + anon_sym_DOLLAR_LBRACE, + STATE(215), 1, + sym_string_content, + ACTIONS(427), 2, + sym__string_content, + sym_escape_sequence, + STATE(194), 2, + sym_expansion, + aux_sym_string_content_repeat1, + [6480] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(429), 1, + anon_sym_DOLLAR, + ACTIONS(431), 1, + anon_sym_DOLLAR_LBRACE, + ACTIONS(433), 1, + anon_sym_DQUOTE, + STATE(216), 1, + sym_string_content, + ACTIONS(427), 2, + sym__string_content, + sym_escape_sequence, + STATE(194), 2, + sym_expansion, + aux_sym_string_content_repeat1, + [6504] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(429), 1, + anon_sym_DOLLAR, + ACTIONS(431), 1, + anon_sym_DOLLAR_LBRACE, + ACTIONS(435), 1, + anon_sym_DQUOTE, + STATE(219), 1, + sym_string_content, + ACTIONS(427), 2, + sym__string_content, + sym_escape_sequence, + STATE(194), 2, + sym_expansion, + aux_sym_string_content_repeat1, + [6528] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(437), 1, + anon_sym_DQUOTE, + ACTIONS(442), 1, + anon_sym_DOLLAR, + ACTIONS(445), 1, + anon_sym_DOLLAR_LBRACE, + ACTIONS(439), 2, + sym__string_content, + sym_escape_sequence, + STATE(193), 2, + sym_expansion, + aux_sym_string_content_repeat1, + [6549] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(429), 1, + anon_sym_DOLLAR, + ACTIONS(431), 1, + anon_sym_DOLLAR_LBRACE, + ACTIONS(448), 1, + anon_sym_DQUOTE, + ACTIONS(450), 2, + sym__string_content, + sym_escape_sequence, + STATE(193), 2, + sym_expansion, + aux_sym_string_content_repeat1, + [6570] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(454), 1, + anon_sym_DOLLAR, + ACTIONS(452), 4, + sym__string_content, + anon_sym_DQUOTE, + sym_escape_sequence, + anon_sym_DOLLAR_LBRACE, + [6583] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(458), 1, + anon_sym_DOLLAR, + ACTIONS(456), 4, + sym__string_content, + anon_sym_DQUOTE, + sym_escape_sequence, + anon_sym_DOLLAR_LBRACE, + [6596] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(460), 1, + anon_sym_if, + STATE(167), 2, + sym_if_statement, + sym_block, + [6610] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LBRACE, + ACTIONS(462), 1, + anon_sym_if, + STATE(165), 2, + sym_if_statement, + sym_block, + [6624] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(464), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + ACTIONS(369), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [6638] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(275), 1, + anon_sym_RBRACK, + ACTIONS(467), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + [6651] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_RPAREN, + ACTIONS(469), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + [6664] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(291), 1, + anon_sym_RPAREN, + ACTIONS(471), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + [6677] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_RBRACK, + ACTIONS(473), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + [6690] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(305), 1, + anon_sym_RPAREN, + ACTIONS(475), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + [6703] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(307), 1, + anon_sym_RBRACK, + ACTIONS(477), 1, + anon_sym_COMMA, + STATE(199), 1, + aux_sym_call_expression_repeat1, + [6716] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LBRACE, + STATE(131), 1, + sym_block, + [6726] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(41), 1, + anon_sym_LBRACE, + STATE(183), 1, + sym_block, + [6736] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(41), 1, + anon_sym_LBRACE, + STATE(130), 1, + sym_block, + [6746] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(479), 2, + sym_hex, + sym_identifier, + [6754] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LBRACE, + STATE(180), 1, + sym_block, + [6764] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(481), 1, + anon_sym_LPAREN, + [6771] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + sym_identifier, + [6778] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(485), 1, + sym_identifier, + [6785] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(487), 1, + anon_sym_COMMA, + [6792] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(489), 1, + anon_sym_DQUOTE, + [6799] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(491), 1, + anon_sym_DQUOTE, + [6806] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(493), 1, + sym_identifier, + [6813] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(495), 1, + ts_builtin_sym_end, + [6820] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(497), 1, + anon_sym_DQUOTE, + [6827] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(499), 1, + sym_identifier, + [6834] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(501), 1, + anon_sym_LPAREN, + [6841] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(503), 1, + anon_sym_LPAREN, + [6848] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(505), 1, + anon_sym_LPAREN, + [6855] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(507), 1, + anon_sym_LPAREN, + [6862] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(509), 1, + anon_sym_COMMA, + [6869] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(511), 1, + sym_identifier, + [6876] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(513), 1, + anon_sym_LPAREN, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(11)] = 0, + [SMALL_STATE(12)] = 35, + [SMALL_STATE(13)] = 76, + [SMALL_STATE(14)] = 111, + [SMALL_STATE(15)] = 146, + [SMALL_STATE(16)] = 185, + [SMALL_STATE(17)] = 220, + [SMALL_STATE(18)] = 261, + [SMALL_STATE(19)] = 300, + [SMALL_STATE(20)] = 335, + [SMALL_STATE(21)] = 370, + [SMALL_STATE(22)] = 403, + [SMALL_STATE(23)] = 438, + [SMALL_STATE(24)] = 473, + [SMALL_STATE(25)] = 506, + [SMALL_STATE(26)] = 541, + [SMALL_STATE(27)] = 576, + [SMALL_STATE(28)] = 609, + [SMALL_STATE(29)] = 644, + [SMALL_STATE(30)] = 679, + [SMALL_STATE(31)] = 712, + [SMALL_STATE(32)] = 746, + [SMALL_STATE(33)] = 778, + [SMALL_STATE(34)] = 810, + [SMALL_STATE(35)] = 842, + [SMALL_STATE(36)] = 874, + [SMALL_STATE(37)] = 906, + [SMALL_STATE(38)] = 938, + [SMALL_STATE(39)] = 970, + [SMALL_STATE(40)] = 1002, + [SMALL_STATE(41)] = 1036, + [SMALL_STATE(42)] = 1068, + [SMALL_STATE(43)] = 1100, + [SMALL_STATE(44)] = 1132, + [SMALL_STATE(45)] = 1178, + [SMALL_STATE(46)] = 1210, + [SMALL_STATE(47)] = 1246, + [SMALL_STATE(48)] = 1286, + [SMALL_STATE(49)] = 1318, + [SMALL_STATE(50)] = 1360, + [SMALL_STATE(51)] = 1406, + [SMALL_STATE(52)] = 1450, + [SMALL_STATE(53)] = 1482, + [SMALL_STATE(54)] = 1514, + [SMALL_STATE(55)] = 1546, + [SMALL_STATE(56)] = 1578, + [SMALL_STATE(57)] = 1610, + [SMALL_STATE(58)] = 1642, + [SMALL_STATE(59)] = 1674, + [SMALL_STATE(60)] = 1706, + [SMALL_STATE(61)] = 1738, + [SMALL_STATE(62)] = 1784, + [SMALL_STATE(63)] = 1820, + [SMALL_STATE(64)] = 1860, + [SMALL_STATE(65)] = 1902, + [SMALL_STATE(66)] = 1946, + [SMALL_STATE(67)] = 1978, + [SMALL_STATE(68)] = 2024, + [SMALL_STATE(69)] = 2056, + [SMALL_STATE(70)] = 2088, + [SMALL_STATE(71)] = 2120, + [SMALL_STATE(72)] = 2152, + [SMALL_STATE(73)] = 2184, + [SMALL_STATE(74)] = 2216, + [SMALL_STATE(75)] = 2248, + [SMALL_STATE(76)] = 2298, + [SMALL_STATE(77)] = 2348, + [SMALL_STATE(78)] = 2398, + [SMALL_STATE(79)] = 2448, + [SMALL_STATE(80)] = 2498, + [SMALL_STATE(81)] = 2548, + [SMALL_STATE(82)] = 2598, + [SMALL_STATE(83)] = 2648, + [SMALL_STATE(84)] = 2698, + [SMALL_STATE(85)] = 2748, + [SMALL_STATE(86)] = 2798, + [SMALL_STATE(87)] = 2848, + [SMALL_STATE(88)] = 2898, + [SMALL_STATE(89)] = 2948, + [SMALL_STATE(90)] = 2998, + [SMALL_STATE(91)] = 3048, + [SMALL_STATE(92)] = 3098, + [SMALL_STATE(93)] = 3148, + [SMALL_STATE(94)] = 3195, + [SMALL_STATE(95)] = 3242, + [SMALL_STATE(96)] = 3289, + [SMALL_STATE(97)] = 3336, + [SMALL_STATE(98)] = 3383, + [SMALL_STATE(99)] = 3430, + [SMALL_STATE(100)] = 3477, + [SMALL_STATE(101)] = 3524, + [SMALL_STATE(102)] = 3573, + [SMALL_STATE(103)] = 3620, + [SMALL_STATE(104)] = 3667, + [SMALL_STATE(105)] = 3714, + [SMALL_STATE(106)] = 3763, + [SMALL_STATE(107)] = 3810, + [SMALL_STATE(108)] = 3857, + [SMALL_STATE(109)] = 3904, + [SMALL_STATE(110)] = 3951, + [SMALL_STATE(111)] = 3998, + [SMALL_STATE(112)] = 4045, + [SMALL_STATE(113)] = 4092, + [SMALL_STATE(114)] = 4139, + [SMALL_STATE(115)] = 4188, + [SMALL_STATE(116)] = 4235, + [SMALL_STATE(117)] = 4282, + [SMALL_STATE(118)] = 4329, + [SMALL_STATE(119)] = 4376, + [SMALL_STATE(120)] = 4423, + [SMALL_STATE(121)] = 4472, + [SMALL_STATE(122)] = 4519, + [SMALL_STATE(123)] = 4566, + [SMALL_STATE(124)] = 4613, + [SMALL_STATE(125)] = 4642, + [SMALL_STATE(126)] = 4671, + [SMALL_STATE(127)] = 4700, + [SMALL_STATE(128)] = 4729, + [SMALL_STATE(129)] = 4757, + [SMALL_STATE(130)] = 4785, + [SMALL_STATE(131)] = 4813, + [SMALL_STATE(132)] = 4841, + [SMALL_STATE(133)] = 4865, + [SMALL_STATE(134)] = 4889, + [SMALL_STATE(135)] = 4917, + [SMALL_STATE(136)] = 4943, + [SMALL_STATE(137)] = 4971, + [SMALL_STATE(138)] = 5010, + [SMALL_STATE(139)] = 5041, + [SMALL_STATE(140)] = 5064, + [SMALL_STATE(141)] = 5087, + [SMALL_STATE(142)] = 5126, + [SMALL_STATE(143)] = 5149, + [SMALL_STATE(144)] = 5172, + [SMALL_STATE(145)] = 5195, + [SMALL_STATE(146)] = 5218, + [SMALL_STATE(147)] = 5241, + [SMALL_STATE(148)] = 5264, + [SMALL_STATE(149)] = 5287, + [SMALL_STATE(150)] = 5314, + [SMALL_STATE(151)] = 5343, + [SMALL_STATE(152)] = 5366, + [SMALL_STATE(153)] = 5401, + [SMALL_STATE(154)] = 5440, + [SMALL_STATE(155)] = 5473, + [SMALL_STATE(156)] = 5512, + [SMALL_STATE(157)] = 5535, + [SMALL_STATE(158)] = 5558, + [SMALL_STATE(159)] = 5581, + [SMALL_STATE(160)] = 5604, + [SMALL_STATE(161)] = 5627, + [SMALL_STATE(162)] = 5666, + [SMALL_STATE(163)] = 5689, + [SMALL_STATE(164)] = 5712, + [SMALL_STATE(165)] = 5751, + [SMALL_STATE(166)] = 5773, + [SMALL_STATE(167)] = 5799, + [SMALL_STATE(168)] = 5821, + [SMALL_STATE(169)] = 5844, + [SMALL_STATE(170)] = 5877, + [SMALL_STATE(171)] = 5910, + [SMALL_STATE(172)] = 5943, + [SMALL_STATE(173)] = 5964, + [SMALL_STATE(174)] = 5997, + [SMALL_STATE(175)] = 6018, + [SMALL_STATE(176)] = 6051, + [SMALL_STATE(177)] = 6084, + [SMALL_STATE(178)] = 6117, + [SMALL_STATE(179)] = 6138, + [SMALL_STATE(180)] = 6159, + [SMALL_STATE(181)] = 6180, + [SMALL_STATE(182)] = 6213, + [SMALL_STATE(183)] = 6246, + [SMALL_STATE(184)] = 6267, + [SMALL_STATE(185)] = 6300, + [SMALL_STATE(186)] = 6333, + [SMALL_STATE(187)] = 6366, + [SMALL_STATE(188)] = 6396, + [SMALL_STATE(189)] = 6426, + [SMALL_STATE(190)] = 6456, + [SMALL_STATE(191)] = 6480, + [SMALL_STATE(192)] = 6504, + [SMALL_STATE(193)] = 6528, + [SMALL_STATE(194)] = 6549, + [SMALL_STATE(195)] = 6570, + [SMALL_STATE(196)] = 6583, + [SMALL_STATE(197)] = 6596, + [SMALL_STATE(198)] = 6610, + [SMALL_STATE(199)] = 6624, + [SMALL_STATE(200)] = 6638, + [SMALL_STATE(201)] = 6651, + [SMALL_STATE(202)] = 6664, + [SMALL_STATE(203)] = 6677, + [SMALL_STATE(204)] = 6690, + [SMALL_STATE(205)] = 6703, + [SMALL_STATE(206)] = 6716, + [SMALL_STATE(207)] = 6726, + [SMALL_STATE(208)] = 6736, + [SMALL_STATE(209)] = 6746, + [SMALL_STATE(210)] = 6754, + [SMALL_STATE(211)] = 6764, + [SMALL_STATE(212)] = 6771, + [SMALL_STATE(213)] = 6778, + [SMALL_STATE(214)] = 6785, + [SMALL_STATE(215)] = 6792, + [SMALL_STATE(216)] = 6799, + [SMALL_STATE(217)] = 6806, + [SMALL_STATE(218)] = 6813, + [SMALL_STATE(219)] = 6820, + [SMALL_STATE(220)] = 6827, + [SMALL_STATE(221)] = 6834, + [SMALL_STATE(222)] = 6841, + [SMALL_STATE(223)] = 6848, + [SMALL_STATE(224)] = 6855, + [SMALL_STATE(225)] = 6862, + [SMALL_STATE(226)] = 6869, + [SMALL_STATE(227)] = 6876, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(211), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(223), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(222), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(221), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(224), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(227), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(17), + [58] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(221), + [61] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(100), + [64] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(224), + [67] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(227), + [70] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(3), + [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), + [75] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(101), + [78] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(90), + [81] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(192), + [84] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(43), + [87] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(42), + [90] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [94] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(12), + [97] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(211), + [100] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(95), + [103] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(223), + [106] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(222), + [109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(6), + [112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(105), + [115] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(76), + [118] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(191), + [121] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(53), + [124] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(58), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), + [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_scope_access, 3, .production_id = 3), + [135] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_scope_access, 3, .production_id = 3), + [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primary_expression, 1), + [139] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primary_expression, 1), + [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [143] = {.entry = {.count = 1, .reusable = false}}, SHIFT(123), + [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [147] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array_access, 4, .production_id = 4), + [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array_access, 4, .production_id = 4), + [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [153] = {.entry = {.count = 1, .reusable = false}}, SHIFT(107), + [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [157] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 5, .production_id = 1), + [159] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 5, .production_id = 1), + [161] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 3), + [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3), + [165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 4, .production_id = 1), + [167] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 4, .production_id = 1), + [169] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 6, .production_id = 1), + [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 6, .production_id = 1), + [173] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2), + [175] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2), + [177] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 3, .production_id = 1), + [179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 3, .production_id = 1), + [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3), + [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3), + [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 2), + [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 2), + [189] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 2), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 2), + [193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2), + [195] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2), + [197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), + [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), + [201] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment_statement, 3), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_statement, 3), + [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [211] = {.entry = {.count = 1, .reusable = false}}, SHIFT(116), + [213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), + [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3), + [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3), + [227] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, .production_id = 2), + [229] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, .production_id = 2), + [231] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3), + [233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), + [235] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1), + [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1), + [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 4), + [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 7, .production_id = 1), + [245] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 7, .production_id = 1), + [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [249] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [261] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 5), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 5), + [265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(135), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [317] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [319] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [321] = {.entry = {.count = 1, .reusable = false}}, SHIFT(166), + [323] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2), + [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2), + [327] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2), SHIFT_REPEAT(197), + [330] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 5), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 5), + [334] = {.entry = {.count = 1, .reusable = false}}, SHIFT(197), + [336] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 5), + [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 5), + [340] = {.entry = {.count = 1, .reusable = false}}, SHIFT(198), + [342] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2), SHIFT_REPEAT(198), + [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [351] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108), + [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [357] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [359] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [361] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [369] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 2), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else_statement, 2, .production_id = 6), + [389] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else_statement, 2, .production_id = 6), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [401] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_statement, 4), + [403] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_statement, 4), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(145), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [411] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_foreach_statement, 7, .production_id = 7), + [413] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_foreach_statement, 7, .production_id = 7), + [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(178), + [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), + [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [429] = {.entry = {.count = 1, .reusable = false}}, SHIFT(209), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [437] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_string_content_repeat1, 2), + [439] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_content_repeat1, 2), SHIFT_REPEAT(193), + [442] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_content_repeat1, 2), SHIFT_REPEAT(209), + [445] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_content_repeat1, 2), SHIFT_REPEAT(120), + [448] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_content, 1), + [450] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [452] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expansion, 2), + [454] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expansion, 2), + [456] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expansion, 3), + [458] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expansion, 3), + [460] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [462] = {.entry = {.count = 1, .reusable = true}}, SHIFT(223), + [464] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 2), SHIFT_REPEAT(118), + [467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [479] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [481] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [495] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), + [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(212), + [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), + [513] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), +}; + +enum ts_external_scanner_symbol_identifiers { + ts_external_token__string_content = 0, +}; + +static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { + [ts_external_token__string_content] = sym__string_content, +}; + +static const bool ts_external_scanner_states[2][EXTERNAL_TOKEN_COUNT] = { + [1] = { + [ts_external_token__string_content] = true, + }, +}; + +#ifdef __cplusplus +extern "C" { +#endif +void *tree_sitter_gn_external_scanner_create(void); +void tree_sitter_gn_external_scanner_destroy(void *); +bool tree_sitter_gn_external_scanner_scan(void *, TSLexer *, const bool *); +unsigned tree_sitter_gn_external_scanner_serialize(void *, char *); +void tree_sitter_gn_external_scanner_deserialize(void *, const char *, unsigned); + +#ifdef _WIN32 +#define extern __declspec(dllexport) +#endif + +extern const TSLanguage *tree_sitter_gn(void) { + static const TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .field_names = ts_field_names, + .field_map_slices = ts_field_map_slices, + .field_map_entries = ts_field_map_entries, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = ts_lex_modes, + .lex_fn = ts_lex, + .keyword_lex_fn = ts_lex_keywords, + .keyword_capture_token = sym_identifier, + .external_scanner = { + &ts_external_scanner_states[0][0], + ts_external_scanner_symbol_map, + tree_sitter_gn_external_scanner_create, + tree_sitter_gn_external_scanner_destroy, + tree_sitter_gn_external_scanner_scan, + tree_sitter_gn_external_scanner_serialize, + tree_sitter_gn_external_scanner_deserialize, + }, + .primary_state_ids = ts_primary_state_ids, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/src/scanner.c b/src/scanner.c new file mode 100644 index 0000000..4db06a2 --- /dev/null +++ b/src/scanner.c @@ -0,0 +1,58 @@ +#include "tree_sitter/parser.h" + +#include + +enum TokenType { STRING_CONTENT }; + +static inline void advance(TSLexer *lexer) { lexer->advance(lexer, false); } + +void *tree_sitter_gn_external_scanner_create() { return NULL; } + +bool tree_sitter_gn_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { + if (valid_symbols[STRING_CONTENT]) { + bool did_advance = false; + for (;;) { + if (lexer->eof(lexer)) { + return false; + } + switch (lexer->lookahead) { + case '\0': + return false; + case '\\': + lexer->mark_end(lexer); + advance(lexer); + if (lexer->lookahead == '\"' || lexer->lookahead == '$' || lexer->lookahead == '\\') { + lexer->result_symbol = STRING_CONTENT; + return did_advance; + } + did_advance = true; + advance(lexer); + break; + case '$': + lexer->mark_end(lexer); + advance(lexer); + if (lexer->lookahead == '{' || isalpha(lexer->lookahead) || lexer->lookahead == '_') { + lexer->result_symbol = STRING_CONTENT; + return did_advance; + } + did_advance = true; + advance(lexer); + break; + case '\"': + lexer->mark_end(lexer); + lexer->result_symbol = STRING_CONTENT; + return did_advance; + default: + did_advance = true; + advance(lexer); + } + } + } + return false; +} + +unsigned tree_sitter_gn_external_scanner_serialize(void *payload, char *buffer) { return 0; } + +void tree_sitter_gn_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) {} + +void tree_sitter_gn_external_scanner_destroy(void *payload) {} diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h new file mode 100644 index 0000000..d210325 --- /dev/null +++ b/src/tree_sitter/parser.h @@ -0,0 +1,224 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; +}; + +/* + * Lexer Macros + */ + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; \ + eof = lexer->eof(lexer); + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value) \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value), \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_val, child_count_val, ...) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_val, \ + .child_count = child_count_val, \ + __VA_ARGS__ \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_