diff --git a/examples/projects/modules/src/main.mth b/examples/projects/modules/src/main.mth index 2d91707..0d86971 100644 --- a/examples/projects/modules/src/main.mth +++ b/examples/projects/modules/src/main.mth @@ -9,4 +9,4 @@ df main() i64 { let d: i64 = geo::distance(p1, p2); let area: i64 = mul(p1.x, p1.y); return util::add(d, area); -} \ No newline at end of file +} diff --git a/examples/symbolic/with_loops.mth b/examples/symbolic/with_loops.mth index ee32e36..cac9811 100644 --- a/examples/symbolic/with_loops.mth +++ b/examples/symbolic/with_loops.mth @@ -8,4 +8,4 @@ df main() u32 { } return e[x=1]; -} \ No newline at end of file +} diff --git a/features/tree-sitter-mathic/.editorconfig b/features/tree-sitter-mathic/.editorconfig new file mode 100644 index 0000000..ff17b12 --- /dev/null +++ b/features/tree-sitter-mathic/.editorconfig @@ -0,0 +1,50 @@ +root = true + +[*] +charset = utf-8 + +[*.{json,toml,yml,gyp,xml}] +indent_style = space +indent_size = 2 + +[*.{js,ts}] +indent_style = space +indent_size = 2 + +[*.scm] +indent_style = space +indent_size = 2 + +[*.{c,cc,h}] +indent_style = space +indent_size = 4 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{py,pyi}] +indent_style = space +indent_size = 4 + +[*.swift] +indent_style = space +indent_size = 4 + +[*.java] +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 8 + +[Makefile] +indent_style = tab +indent_size = 8 + +[parser.c] +indent_size = 2 + +[{alloc,array,parser}.h] +indent_size = 2 diff --git a/features/tree-sitter-mathic/.gitattributes b/features/tree-sitter-mathic/.gitattributes new file mode 100644 index 0000000..027ac70 --- /dev/null +++ b/features/tree-sitter-mathic/.gitattributes @@ -0,0 +1,46 @@ +* text=auto eol=lf + +# Generated source files +src/*.json linguist-generated +src/parser.c linguist-generated +src/tree_sitter/* linguist-generated + +# C bindings +bindings/c/** linguist-generated +CMakeLists.txt linguist-generated +Makefile linguist-generated + +# Rust bindings +bindings/rust/* linguist-generated +Cargo.toml linguist-generated +Cargo.lock linguist-generated + +# Node.js bindings +bindings/node/* linguist-generated +binding.gyp linguist-generated +package.json linguist-generated +package-lock.json linguist-generated + +# Python bindings +bindings/python/** linguist-generated +setup.py linguist-generated +pyproject.toml linguist-generated + +# Go bindings +bindings/go/* linguist-generated +go.mod linguist-generated +go.sum linguist-generated + +# Swift bindings +bindings/swift/** linguist-generated +Package.swift linguist-generated +Package.resolved linguist-generated + +# Zig bindings +bindings/zig/* linguist-generated +build.zig linguist-generated +build.zig.zon linguist-generated + +# Java bindings +pom.xml linguist-generated +bindings/java/** linguist-generated diff --git a/features/tree-sitter-mathic/.gitignore b/features/tree-sitter-mathic/.gitignore new file mode 100644 index 0000000..7c0cb7f --- /dev/null +++ b/features/tree-sitter-mathic/.gitignore @@ -0,0 +1,48 @@ +# Rust artifacts +target/ + +# Node artifacts +build/ +prebuilds/ +node_modules/ + +# Swift artifacts +.build/ + +# Go artifacts +_obj/ + +# Python artifacts +.venv/ +dist/ +*.egg-info +*.whl + +# C artifacts +*.a +*.so +*.so.* +*.dylib +*.dll +*.pc +*.exp +*.lib + +# Zig artifacts +.zig-cache/ +zig-cache/ +zig-out/ + +# Example dirs +/examples/*/ + +# Grammar volatiles +*.wasm +*.obj +*.o + +# Archives +*.tar.gz +*.tgz +*.zip +*.jar diff --git a/features/tree-sitter-mathic/CMakeLists.txt b/features/tree-sitter-mathic/CMakeLists.txt new file mode 100644 index 0000000..1d1d408 --- /dev/null +++ b/features/tree-sitter-mathic/CMakeLists.txt @@ -0,0 +1,76 @@ +cmake_minimum_required(VERSION 3.13) + +project(tree-sitter-mathic + VERSION "0.1.0" + DESCRIPTION "tree-sitter for Mathic's grammar" + HOMEPAGE_URL "https://github.com/francogiachetta/mathic" + LANGUAGES C) + +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) +option(TREE_SITTER_REUSE_ALLOCATOR "Reuse the library allocator" OFF) + +set(TREE_SITTER_ABI_VERSION 15 CACHE STRING "Tree-sitter ABI version") +if(NOT ${TREE_SITTER_ABI_VERSION} MATCHES "^[0-9]+$") + unset(TREE_SITTER_ABI_VERSION CACHE) + message(FATAL_ERROR "TREE_SITTER_ABI_VERSION must be an integer") +endif() + +include(GNUInstallDirs) + +find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI") + +add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json" + "${CMAKE_CURRENT_SOURCE_DIR}/src/node-types.json" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/grammar.js" + COMMAND "${TREE_SITTER_CLI}" generate grammar.js --no-parser + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generating grammar.json") + +add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" + BYPRODUCTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tree_sitter/parser.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/tree_sitter/alloc.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/tree_sitter/array.h" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json" + COMMAND "${TREE_SITTER_CLI}" generate src/grammar.json + --abi=${TREE_SITTER_ABI_VERSION} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generating parser.c") + +add_library(tree-sitter-mathic src/parser.c) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) + target_sources(tree-sitter-mathic PRIVATE src/scanner.c) +endif() +target_include_directories(tree-sitter-mathic + PRIVATE src + INTERFACE $ + $) + +target_compile_definitions(tree-sitter-mathic PRIVATE + $<$:TREE_SITTER_REUSE_ALLOCATOR> + $<$:TREE_SITTER_DEBUG>) + +set_target_properties(tree-sitter-mathic + PROPERTIES + C_STANDARD 11 + POSITION_INDEPENDENT_CODE ON + SOVERSION "${TREE_SITTER_ABI_VERSION}.${PROJECT_VERSION_MAJOR}" + DEFINE_SYMBOL "") + +configure_file(bindings/c/tree-sitter-mathic.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-mathic.pc" @ONLY) + +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree_sitter" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + FILES_MATCHING PATTERN "*.h") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-mathic.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +install(TARGETS tree-sitter-mathic + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +file(GLOB QUERIES queries/*.scm) +install(FILES ${QUERIES} + DESTINATION "${CMAKE_INSTALL_DATADIR}/tree-sitter/queries/mathic") + +add_custom_target(ts-test "${TREE_SITTER_CLI}" test + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "tree-sitter test") diff --git a/features/tree-sitter-mathic/Cargo.toml b/features/tree-sitter-mathic/Cargo.toml new file mode 100644 index 0000000..d3cbb56 --- /dev/null +++ b/features/tree-sitter-mathic/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "tree-sitter-mathic" +description = "tree-sitter for Mathic's grammar" +version = "0.1.0" +authors = ["Franco Giachetta "] +license = "Apache" +readme = "README.md" +keywords = ["incremental", "parsing", "tree-sitter", "mathic"] +categories = ["parser-implementations", "parsing", "text-editors"] +repository = "https://github.com/francogiachetta/mathic" +edition = "2021" +autoexamples = false + +build = "bindings/rust/build.rs" +include = [ + "bindings/rust/*", + "grammar.js", + "queries/*", + "src/*", + "tree-sitter.json", + "/LICENSE", +] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter-language = "0.1" + +[build-dependencies] +cc = "1.2" + +[dev-dependencies] +tree-sitter = "0.26.7" diff --git a/features/tree-sitter-mathic/Makefile b/features/tree-sitter-mathic/Makefile new file mode 100644 index 0000000..08ba6d1 --- /dev/null +++ b/features/tree-sitter-mathic/Makefile @@ -0,0 +1,115 @@ +LANGUAGE_NAME := tree-sitter-mathic +HOMEPAGE_URL := https://github.com/francogiachetta/mathic +VERSION := 0.1.0 + +# repository +SRC_DIR := src + +TS ?= tree-sitter + +# install directory layout +PREFIX ?= /usr/local +DATADIR ?= $(PREFIX)/share +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +BINDIR ?= $(PREFIX)/bin +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# source/object files +PARSER := $(SRC_DIR)/parser.c +EXTRAS := $(filter-out $(PARSER),$(wildcard $(SRC_DIR)/*.c)) +OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS)) + +# flags +ARFLAGS ?= rcs +override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC + +# ABI versioning +SONAME_MAJOR = $(shell sed -n 's/\#define LANGUAGE_VERSION //p' $(PARSER)) +SONAME_MINOR = $(word 1,$(subst ., ,$(VERSION))) + +# OS-specific bits +MACHINE := $(shell $(CC) -dumpmachine) + +ifneq ($(findstring darwin,$(MACHINE)),) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT) + LINKSHARED = -dynamiclib -Wl,-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks +else ifneq ($(findstring mingw32,$(MACHINE)),) + SOEXT = dll + LINKSHARED += -s -shared -Wl,--out-implib,lib$(LANGUAGE_NAME).dll.a +else + SOEXT = so + SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) + SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED = -shared -Wl,-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +endif +endif + +all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc + +lib$(LANGUAGE_NAME).a: $(OBJS) + $(AR) $(ARFLAGS) $@ $^ + +lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) + $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ +ifneq ($(STRIP),) + $(STRIP) $@ +endif + +ifneq ($(findstring mingw32,$(MACHINE)),) +lib$(LANGUAGE_NAME).dll.a: lib$(LANGUAGE_NAME).$(SOEXT) +endif + +$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in + sed -e 's|@PROJECT_VERSION@|$(VERSION)|' \ + -e 's|@CMAKE_INSTALL_LIBDIR@|$(LIBDIR:$(PREFIX)/%=%)|' \ + -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \ + -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \ + -e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \ + -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@ + +$(SRC_DIR)/grammar.json: grammar.js + $(TS) generate --no-parser $^ + +$(PARSER): $(SRC_DIR)/grammar.json + $(TS) generate $^ + +install: all + install -d '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/mathic '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' + install -m644 bindings/c/tree_sitter/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a + install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) +ifneq ($(findstring mingw32,$(MACHINE)),) + install -d '$(DESTDIR)$(BINDIR)' + install -m755 lib$(LANGUAGE_NAME).dll '$(DESTDIR)$(BINDIR)'/lib$(LANGUAGE_NAME).dll + install -m755 lib$(LANGUAGE_NAME).dll.a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).dll.a +else + install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) + cd '$(DESTDIR)$(LIBDIR)' && ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) + cd '$(DESTDIR)$(LIBDIR)' && ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) lib$(LANGUAGE_NAME).$(SOEXT) +endif +ifneq ($(wildcard queries/*.scm),) + install -m644 queries/*.scm '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/mathic +endif + +uninstall: + $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ + '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ + '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + $(RM) -r '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/mathic + +clean: + $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) lib$(LANGUAGE_NAME).dll.a + +test: + $(TS) test + +.PHONY: all install uninstall clean test diff --git a/features/tree-sitter-mathic/Package.swift b/features/tree-sitter-mathic/Package.swift new file mode 100644 index 0000000..4255c26 --- /dev/null +++ b/features/tree-sitter-mathic/Package.swift @@ -0,0 +1,41 @@ +// swift-tools-version:5.3 + +import Foundation +import PackageDescription + +var sources = ["src/parser.c"] +if FileManager.default.fileExists(atPath: "src/scanner.c") { + sources.append("src/scanner.c") +} + +let package = Package( + name: "TreeSitterMathic", + products: [ + .library(name: "TreeSitterMathic", targets: ["TreeSitterMathic"]), + ], + dependencies: [ + .package(name: "SwiftTreeSitter", url: "https://github.com/tree-sitter/swift-tree-sitter", from: "0.9.0"), + ], + targets: [ + .target( + name: "TreeSitterMathic", + dependencies: [], + path: ".", + sources: sources, + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")] + ), + .testTarget( + name: "TreeSitterMathicTests", + dependencies: [ + "SwiftTreeSitter", + "TreeSitterMathic", + ], + path: "bindings/swift/TreeSitterMathicTests" + ) + ], + cLanguageStandard: .c11 +) diff --git a/features/tree-sitter-mathic/binding.gyp b/features/tree-sitter-mathic/binding.gyp new file mode 100644 index 0000000..381c790 --- /dev/null +++ b/features/tree-sitter-mathic/binding.gyp @@ -0,0 +1,35 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_mathic_binding", + "dependencies": [ + " + +typedef struct TSLanguage TSLanguage; + +extern "C" TSLanguage *tree_sitter_mathic(); + +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; + +Napi::Object Init(Napi::Env env, Napi::Object exports) { + auto language = Napi::External::New(env, tree_sitter_mathic()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; +} + +NODE_API_MODULE(tree_sitter_mathic_binding, Init) diff --git a/features/tree-sitter-mathic/bindings/node/binding_test.js b/features/tree-sitter-mathic/bindings/node/binding_test.js new file mode 100644 index 0000000..7a91a84 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/node/binding_test.js @@ -0,0 +1,11 @@ +import assert from "node:assert"; +import { test } from "node:test"; +import Parser from "tree-sitter"; + +test("can load grammar", () => { + const parser = new Parser(); + assert.doesNotReject(async () => { + const { default: language } = await import("./index.js"); + parser.setLanguage(language); + }); +}); diff --git a/features/tree-sitter-mathic/bindings/node/index.d.ts b/features/tree-sitter-mathic/bindings/node/index.d.ts new file mode 100644 index 0000000..7e3c385 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/node/index.d.ts @@ -0,0 +1,60 @@ +type BaseNode = { + type: string; + named: boolean; +}; + +type ChildNode = { + multiple: boolean; + required: boolean; + types: BaseNode[]; +}; + +type NodeInfo = + | (BaseNode & { + subtypes: BaseNode[]; + }) + | (BaseNode & { + fields: { [name: string]: ChildNode }; + children: ChildNode[]; + }); + +/** + * The tree-sitter language object for this grammar. + * + * @see {@linkcode https://tree-sitter.github.io/node-tree-sitter/interfaces/Parser.Language.html Parser.Language} + * + * @example + * import Parser from "tree-sitter"; + * import Mathic from "tree-sitter-mathic"; + * + * const parser = new Parser(); + * parser.setLanguage(Mathic); + */ +declare const binding: { + /** + * The inner language object. + * @private + */ + language: unknown; + + /** + * The content of the `node-types.json` file for this grammar. + * + * @see {@linkplain https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types Static Node Types} + */ + nodeTypeInfo: NodeInfo[]; + + /** The syntax highlighting query for this grammar. */ + HIGHLIGHTS_QUERY?: string; + + /** The language injection query for this grammar. */ + INJECTIONS_QUERY?: string; + + /** The local variable query for this grammar. */ + LOCALS_QUERY?: string; + + /** The symbol tagging query for this grammar. */ + TAGS_QUERY?: string; +}; + +export default binding; diff --git a/features/tree-sitter-mathic/bindings/node/index.js b/features/tree-sitter-mathic/bindings/node/index.js new file mode 100644 index 0000000..126bdd1 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/node/index.js @@ -0,0 +1,37 @@ +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; + +const root = fileURLToPath(new URL("../..", import.meta.url)); + +const binding = typeof process.versions.bun === "string" + // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time + ? await import(`${root}/prebuilds/${process.platform}-${process.arch}/tree-sitter-mathic.node`) + : (await import("node-gyp-build")).default(root); + +try { + const nodeTypes = await import(`${root}/src/node-types.json`, { with: { type: "json" } }); + binding.nodeTypeInfo = nodeTypes.default; +} catch { } + +const queries = [ + ["HIGHLIGHTS_QUERY", `${root}/queries/highlights.scm`], + ["INJECTIONS_QUERY", `${root}/queries/injections.scm`], + ["LOCALS_QUERY", `${root}/queries/locals.scm`], + ["TAGS_QUERY", `${root}/queries/tags.scm`], +]; + +for (const [prop, path] of queries) { + Object.defineProperty(binding, prop, { + configurable: true, + enumerable: true, + get() { + delete binding[prop]; + try { + binding[prop] = readFileSync(path, "utf8"); + } catch { } + return binding[prop]; + } + }); +} + +export default binding; diff --git a/features/tree-sitter-mathic/bindings/python/tests/test_binding.py b/features/tree-sitter-mathic/bindings/python/tests/test_binding.py new file mode 100644 index 0000000..e164e50 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/python/tests/test_binding.py @@ -0,0 +1,12 @@ +from unittest import TestCase + +from tree_sitter import Language, Parser +import tree_sitter_mathic + + +class TestLanguage(TestCase): + def test_can_load_grammar(self): + try: + Parser(Language(tree_sitter_mathic.language())) + except Exception: + self.fail("Error loading Mathic grammar") diff --git a/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/__init__.py b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/__init__.py new file mode 100644 index 0000000..9d49947 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/__init__.py @@ -0,0 +1,43 @@ +"""tree-sitter for Mathic's grammar""" + +from importlib.resources import files as _files + +from ._binding import language + + +def _get_query(name, file): + try: + query = _files(f"{__package__}") / file + globals()[name] = query.read_text() + except FileNotFoundError: + globals()[name] = None + return globals()[name] + + +def __getattr__(name): + if name == "HIGHLIGHTS_QUERY": + return _get_query("HIGHLIGHTS_QUERY", "queries/highlights.scm") + if name == "INJECTIONS_QUERY": + return _get_query("INJECTIONS_QUERY", "queries/injections.scm") + if name == "LOCALS_QUERY": + return _get_query("LOCALS_QUERY", "queries/locals.scm") + if name == "TAGS_QUERY": + return _get_query("TAGS_QUERY", "queries/tags.scm") + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") + + +__all__ = [ + "language", + "HIGHLIGHTS_QUERY", + "INJECTIONS_QUERY", + "LOCALS_QUERY", + "TAGS_QUERY", +] + + +def __dir__(): + return sorted(__all__ + [ + "__all__", "__builtins__", "__cached__", "__doc__", "__file__", + "__loader__", "__name__", "__package__", "__path__", "__spec__", + ]) diff --git a/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/__init__.pyi b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/__init__.pyi new file mode 100644 index 0000000..5c88ff6 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/__init__.pyi @@ -0,0 +1,17 @@ +from typing import Final +from typing_extensions import CapsuleType + +HIGHLIGHTS_QUERY: Final[str] | None +"""The syntax highlighting query for this grammar.""" + +INJECTIONS_QUERY: Final[str] | None +"""The language injection query for this grammar.""" + +LOCALS_QUERY: Final[str] | None +"""The local variable query for this grammar.""" + +TAGS_QUERY: Final[str] | None +"""The symbol tagging query for this grammar.""" + +def language() -> CapsuleType: + """The tree-sitter language function for this grammar.""" diff --git a/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/binding.c b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/binding.c new file mode 100644 index 0000000..f91fe82 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/binding.c @@ -0,0 +1,35 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_mathic(void); + +static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { + return PyCapsule_New(tree_sitter_mathic(), "tree_sitter.Language", NULL); +} + +static struct PyModuleDef_Slot slots[] = { +#ifdef Py_GIL_DISABLED + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, +#endif + {0, NULL} +}; + +static PyMethodDef methods[] = { + {"language", _binding_language, METH_NOARGS, + "Get the tree-sitter language for this grammar."}, + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef module = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_binding", + .m_doc = NULL, + .m_size = 0, + .m_methods = methods, + .m_slots = slots, +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModuleDef_Init(&module); +} diff --git a/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/py.typed b/features/tree-sitter-mathic/bindings/python/tree_sitter_mathic/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/features/tree-sitter-mathic/bindings/rust/build.rs b/features/tree-sitter-mathic/bindings/rust/build.rs new file mode 100644 index 0000000..94dcc65 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/rust/build.rs @@ -0,0 +1,56 @@ +fn main() { + let src_dir = std::path::Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.std("c11").include(src_dir); + + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); + + if std::env::var("TARGET").unwrap() == "wasm32-unknown-unknown" { + let Ok(wasm_headers) = std::env::var("DEP_TREE_SITTER_LANGUAGE_WASM_HEADERS") else { + panic!("Environment variable DEP_TREE_SITTER_LANGUAGE_WASM_HEADERS must be set by the language crate"); + }; + let Ok(wasm_src) = + std::env::var("DEP_TREE_SITTER_LANGUAGE_WASM_SRC").map(std::path::PathBuf::from) + else { + panic!("Environment variable DEP_TREE_SITTER_LANGUAGE_WASM_SRC must be set by the language crate"); + }; + + c_config.include(&wasm_headers); + c_config.files([ + wasm_src.join("stdio.c"), + wasm_src.join("stdlib.c"), + wasm_src.join("string.c"), + ]); + } + + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); + + let scanner_path = src_dir.join("scanner.c"); + if scanner_path.exists() { + c_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + } + + c_config.compile("tree-sitter-mathic"); + + println!("cargo:rustc-check-cfg=cfg(with_highlights_query)"); + if !"queries/highlights.scm".is_empty() && std::path::Path::new("queries/highlights.scm").exists() { + println!("cargo:rustc-cfg=with_highlights_query"); + } + println!("cargo:rustc-check-cfg=cfg(with_injections_query)"); + if !"queries/injections.scm".is_empty() && std::path::Path::new("queries/injections.scm").exists() { + println!("cargo:rustc-cfg=with_injections_query"); + } + println!("cargo:rustc-check-cfg=cfg(with_locals_query)"); + if !"queries/locals.scm".is_empty() && std::path::Path::new("queries/locals.scm").exists() { + println!("cargo:rustc-cfg=with_locals_query"); + } + println!("cargo:rustc-check-cfg=cfg(with_tags_query)"); + if !"queries/tags.scm".is_empty() && std::path::Path::new("queries/tags.scm").exists() { + println!("cargo:rustc-cfg=with_tags_query"); + } +} diff --git a/features/tree-sitter-mathic/bindings/rust/lib.rs b/features/tree-sitter-mathic/bindings/rust/lib.rs new file mode 100644 index 0000000..db22ec9 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/rust/lib.rs @@ -0,0 +1,60 @@ +//! This crate provides Mathic language support for the [tree-sitter] parsing library. +//! +//! Typically, you will use the [`LANGUAGE`] constant to add this language to a +//! tree-sitter [`Parser`], and then use the parser to parse some code: +//! +//! ``` +//! let code = r#" +//! "#; +//! let mut parser = tree_sitter::Parser::new(); +//! let language = tree_sitter_mathic::LANGUAGE; +//! parser +//! .set_language(&language.into()) +//! .expect("Error loading Mathic parser"); +//! let tree = parser.parse(code, None).unwrap(); +//! assert!(!tree.root_node().has_error()); +//! ``` +//! +//! [`Parser`]: https://docs.rs/tree-sitter/0.26.7/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter_language::LanguageFn; + +extern "C" { + fn tree_sitter_mathic() -> *const (); +} + +/// The tree-sitter [`LanguageFn`] for this grammar. +pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_mathic) }; + +/// The content of the [`node-types.json`] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); + +#[cfg(with_highlights_query)] +/// The syntax highlighting query for this grammar. +pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); + +#[cfg(with_injections_query)] +/// The language injection query for this grammar. +pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); + +#[cfg(with_locals_query)] +/// The local variable query for this grammar. +pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); + +#[cfg(with_tags_query)] +/// The symbol tagging query for this grammar. +pub const TAGS_QUERY: &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.into()) + .expect("Error loading Mathic parser"); + } +} diff --git a/features/tree-sitter-mathic/bindings/swift/TreeSitterMathic/mathic.h b/features/tree-sitter-mathic/bindings/swift/TreeSitterMathic/mathic.h new file mode 100644 index 0000000..e75fac5 --- /dev/null +++ b/features/tree-sitter-mathic/bindings/swift/TreeSitterMathic/mathic.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_MATHIC_H_ +#define TREE_SITTER_MATHIC_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_mathic(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_MATHIC_H_ diff --git a/features/tree-sitter-mathic/bindings/swift/TreeSitterMathicTests/TreeSitterMathicTests.swift b/features/tree-sitter-mathic/bindings/swift/TreeSitterMathicTests/TreeSitterMathicTests.swift new file mode 100644 index 0000000..d9ad74a --- /dev/null +++ b/features/tree-sitter-mathic/bindings/swift/TreeSitterMathicTests/TreeSitterMathicTests.swift @@ -0,0 +1,12 @@ +import XCTest +import SwiftTreeSitter +import TreeSitterMathic + +final class TreeSitterMathicTests: XCTestCase { + func testCanLoadGrammar() throws { + let parser = Parser() + let language = Language(language: tree_sitter_mathic()) + XCTAssertNoThrow(try parser.setLanguage(language), + "Error loading Mathic grammar") + } +} diff --git a/features/tree-sitter-mathic/eslint.config.js b/features/tree-sitter-mathic/eslint.config.js new file mode 100644 index 0000000..cc5f6b0 --- /dev/null +++ b/features/tree-sitter-mathic/eslint.config.js @@ -0,0 +1,9 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import { defineConfig } from "eslint/config"; + +export default defineConfig([ + { files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } }, + tseslint.configs.recommended, +]); diff --git a/features/tree-sitter-mathic/go.mod b/features/tree-sitter-mathic/go.mod new file mode 100644 index 0000000..897b548 --- /dev/null +++ b/features/tree-sitter-mathic/go.mod @@ -0,0 +1,5 @@ +module github.com/francogiachetta/mathic + +go 1.22 + +require github.com/tree-sitter/go-tree-sitter v0.24.0 diff --git a/features/tree-sitter-mathic/grammar.js b/features/tree-sitter-mathic/grammar.js new file mode 100644 index 0000000..e7ee071 --- /dev/null +++ b/features/tree-sitter-mathic/grammar.js @@ -0,0 +1,340 @@ +/** + * @file tree-sitter for Mathic's grammar + * @author Franco Giachetta + * @license Apache + */ + +/// +// @ts-check + +const PREC = { + ASSIGNMENT: -1, + LOGICAL_OR: 0, + LOGICAL_AND: 1, + EQUALITY: 2, + INEQUALITY: 3, + ADDITION: 4, + MULTIPLICATION: 5, + UNARY: 6, + CALL: 7, +}; + +const numericTypes = [ + "u8", + "i8", + "u16", + "i16", + "u32", + "i32", + "u64", + "i64", + "u128", + "i128", + "isz", + "usz", + "f32", + "f64", +]; + +const nativeTypes = numericTypes.concat(["bool", "str", "char", "expr"]); + +export default grammar({ + name: "mathic", + + conflicts: ($) => [ + [$.assignment, $._path_identifier], + [$.expression, $.expression_no_assign], + ], + + extras: ($) => [/\s|\\\r?\n/, $.comment], + + inline: ($) => [$._field_identifier, $.bracket_type, $._type_identifier], + + supertypes: ($) => [ + $.top_decl, + $.declaration, + $.stmt, + $.expression, + $.expression_no_assign, + $.non_binary_expression, + ], + + word: ($) => $.IDENT, + + rules: { + /// ================================================================ + /// Program + /// ================================================================ + + program: ($) => repeat($.top_decl), + + top_decl: ($) => choice($.func_decl, $.struct_decl, $.imports_decls), + + imports_decls: ($) => seq("imp", $.import_path, ";"), + + func_decl: ($) => + seq( + "df", + field("name", $.IDENT), + "(", + field("params", optional($.param_list)), + ")", + field("return_type", optional($._type)), + field("body", $.block), + ), + + struct_decl: ($) => + seq( + "struct", + field("name", $.IDENT), + "{", + field("fields", optional($.struct_fields)), + "}", + ), + + /// ================================================================ + /// Declarations + /// ================================================================ + + declaration: ($) => + choice($.func_decl, $.struct_decl, $.var_decl, $.sym_decl), + + var_decl: ($) => + seq( + "let", + field("name", $.IDENT), + ":", + field("type", $._type), + "=", + field("value", $.expression), + ";", + ), + + sym_decl: ($) => + seq("sym", field("name", $.IDENT), ":", field("type", $._type), ";"), + + /// ================================================================ + /// Statements + /// ================================================================ + + stmt: ($) => + choice( + $.declaration, + $.for_stmt, + $.while_stmt, + $.if_stmt, + $.return_stmt, + $.expr_stmt, + $.block, + ), + + for_stmt: ($) => + seq( + "for", + $.IDENT, + "in", + $.expression_no_assign, + choice( + field("loop_body", $.block), + seq("..", $.expression_no_assign, field("loop_body", $.block)), + ), + ), + + while_stmt: ($) => + seq( + "while", + field("condition", $.expression_no_assign), + field("then_body", $.block), + ), + + if_stmt: ($) => + seq( + "if", + field("condition", $.expression_no_assign), + field("then_body", $.block), + optional(seq("else", field("else_body", $.block))), + ), + + return_stmt: ($) => seq("return", field("value", $.expression), ";"), + + expr_stmt: ($) => seq($.expression, ";"), + + block: ($) => seq("{", repeat($.stmt), "}"), + + /// ================================================================ + /// Expressions + /// ================================================================ + + expression: ($) => + choice( + $.assignment_expression, + $.binary_expression, + $.non_binary_expression, + ), + + binary_expression: ($) => { + const prec_table = [ + ["or", PREC.LOGICAL_OR], + ["and", PREC.LOGICAL_AND], + ["==", PREC.EQUALITY], + ["!=", PREC.EQUALITY], + ["<", PREC.INEQUALITY], + [">", PREC.INEQUALITY], + ["<=", PREC.INEQUALITY], + [">=", PREC.INEQUALITY], + ["+", PREC.ADDITION], + ["-", PREC.ADDITION], + ["*", PREC.MULTIPLICATION], + ["/", PREC.MULTIPLICATION], + ]; + + return choice( + ...prec_table.map(([op, op_prec]) => { + return prec.left( + op_prec, + seq( + field("lhs", $.expression_no_assign), + field("operation", op), + field("rhs", $.expression_no_assign), + ), + ); + }), + ); + }, + + non_binary_expression: ($) => choice($.unary_expression, $.call_expression), + + assignment_expression: ($) => + prec.right(PREC.ASSIGNMENT, choice($.assignment, $.initializer)), + + assignment: ($) => + seq( + field("lhs", seq($.IDENT, repeat($.field_access))), + "=", + field("rhs", $.expression), + ), + + initializer: ($) => seq($.expression_no_assign, optional($.struct_init)), + + expression_no_assign: ($) => + choice($.binary_expression, $.non_binary_expression), + + unary_expression: ($) => + prec.right( + PREC.UNARY, + seq( + field("operator", choice("!", "-")), + field("rhs", $.non_binary_expression), + ), + ), + + call_expression: ($) => + seq( + field("callee", $.primary), + repeat( + choice( + seq("(", field("arguments", optional($.args_list)), ")"), + seq($.field_access), + seq("[", $.bracket_args, "]"), + ), + ), + ), + + bracket_args: ($) => $.substitution_args, + + struct_init: ($) => + seq( + "{", + seq($.IDENT, ":", $.expression), + repeat(seq(",", $.IDENT, ":", $.expression)), + "}", + ), + + substitution_args: ($) => + seq( + field("sym", $.IDENT), + "=", + $.expression, + repeat(seq(",", field("sym", $.IDENT), "=", $.expression)), + ), + + primary: ($) => + choice( + "true", + "false", + $.path, + $.NUM, + $.STRING, + seq("(", $.expression, ")"), + ), + + /// ================================================================ + /// Utilities + /// ================================================================ + + param_list: ($) => + seq($.IDENT, ":", $._type, repeat(seq(",", $.IDENT, ":", $._type))), + + struct_fields: ($) => + seq( + optional("pub"), + $.IDENT, + ":", + $._type, + repeat(seq(",", optional("pub"), $.IDENT, ":", $._type)), + ), + + args_list: ($) => seq($.expression, repeat(seq(",", $.expression))), + + import_path: ($) => + seq( + $.IDENT, + optional( + seq( + "::", + choice( + $.import_path, + "*", + seq( + "{", + seq($.import_path, repeat(seq(",", $.import_path))), + "}", + ), + ), + ), + ), + ), + + path: ($) => choice(field("head", seq($._path_identifier, "::", $.path)), field("tail", $._path_identifier)), + // path: ($) => seq($.IDENT, repeat(seq("::", $.IDENT))), + + field_access: ($) => seq(".", field("field", $._field_identifier)), + + /// ================================================================ + /// Types + /// ================================================================ + + _type: ($) => choice($.bracket_type, $.native_type, $._type_identifier), + + native_type: ($) => choice(...nativeTypes), + + bracket_type: ($) => seq($.path, seq("<", $._type, ">")), + + /// ================================================================ + /// Terminal token classes + /// ================================================================ + + IDENT: ($) => /[\p{XID_Start}_]\p{XID_Continue}*/, + NUM: ($) => token(/0|[1-9]\d*(\.\d+)?/), + STRING: ($) => /"[^"]*"/, + + comment: ($) => + token( + choice(seq("//", /.*/), seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, "/")), + ), + + _field_identifier: ($) => alias($.IDENT, $.field_identifier), + _type_identifier: ($) => alias($.IDENT, $.type_identifier), + _path_identifier: ($) => alias($.IDENT, $.path_identifier), + }, +}); diff --git a/features/tree-sitter-mathic/package-lock.json b/features/tree-sitter-mathic/package-lock.json new file mode 100644 index 0000000..f0f049e --- /dev/null +++ b/features/tree-sitter-mathic/package-lock.json @@ -0,0 +1,1983 @@ +{ + "name": "tree-sitter-mathic", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "tree-sitter-mathic", + "version": "0.1.0", + "hasInstallScript": true, + "license": "Apache", + "dependencies": { + "node-addon-api": "^8.5.0", + "node-gyp-build": "^4.8.4", + "oxlint": "^1.79.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "eslint": "^10.8.1", + "globals": "^17.11.0", + "prebuildify": "^6.0.1", + "tree-sitter": "^0.25.0", + "tree-sitter-cli": "^0.26.7", + "typescript-eslint": "^8.67.0" + }, + "peerDependencies": { + "tree-sitter": "^0.25.0" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.79.0.tgz", + "integrity": "sha512-TebFaaMklO/RXzTv7PucaCq9l3X6D1gA+C8H6K4njtjFOV+zWE9MKLpulcJZN9bzytbUbQIY0mZuz12nQ5Kv4Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.79.0.tgz", + "integrity": "sha512-KqqnOtAVgNsPPF0YSodkFZA1O80jcKoCZCTu3bgsszxA+MrMP9TLzfXitKjEj1FmrPprKDMdRDMmY3weESO9sg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.79.0.tgz", + "integrity": "sha512-BVC2nsMzqQzRDPc5RhixkZ+m1p7iH4bxRRvqkbwDXX0PlQKm1BPy8J8cRjnAFafOq2QzI+BfO3vE8w2GZ3CBag==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.79.0.tgz", + "integrity": "sha512-p6Lm+snmhGuLKL1+CpCV8L6ijkE/qJzK2H2jG9+eKJT0n31RbY4FLsdhexekgP3bLpw4Kgde+9DZuDZQ4yIInA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.79.0.tgz", + "integrity": "sha512-qDMm0dXZnoHyRqSL4N4xUq82T4sqK5cbKSjvd/dF/YbMUXc2R1wEPf+vmA5S0qUmi0nwXfNbjXBtZaIqzQLIMg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.79.0.tgz", + "integrity": "sha512-2od7s0nuKPzqyUZAWk9KkCyGg7eI9dwFPZg+20lB15fKFkVZ0c9ZFxqPfiBAyDTlTkh9stPI0t+JlPCqMbItVA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.79.0.tgz", + "integrity": "sha512-ZOQUjkzDnvlhSE3+tWC3YXx94MMl+sYMlwH+u1+YGApGHOJP/YAc8ZBRFOXZ6eOBmxtXAWuS/fBcdZr8qqNO1A==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.79.0.tgz", + "integrity": "sha512-lu158FR4nGqGeRS3BQvtG85wRgU/Fy4MD5Cxp1hzJXizGiLo6u2742wJSCDKh8cFcZntvX7fcxlq4mMmfryH1g==", + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.79.0.tgz", + "integrity": "sha512-mbpKQeE2aflTjddaHK7MP8KP/OFbUM++lt5M635ENM8IyIdK0jm2t9pb+2v9mVVIvhF6TqA4l7F79Pll1mi+uw==", + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.79.0.tgz", + "integrity": "sha512-WpGNua7gaxaHnpSDeog2ji8IDHn/QLPl9LPzwkR/FvVv58vT5BcXjRXnU+wbu3N75cpeha8CdC7ho/U2OIsB4g==", + "cpu": [ + "ppc64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.79.0.tgz", + "integrity": "sha512-tK1E93A5LVzISg4ngpKJnfTs7EqtIUceGI7MQ4GyDjJiLi8wPCkEyKlj2xkyKWZ1yzkDJyLHTBJ5/iFWRdnJvg==", + "cpu": [ + "riscv64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.79.0.tgz", + "integrity": "sha512-qhQvUIrngXivA2A9pQ+xPCychztn/5qUv7yS3gDwXv3w7Rag+eTeeXWmRyx+t7XsW5x6LuY/8AsTq36UgFIblg==", + "cpu": [ + "riscv64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.79.0.tgz", + "integrity": "sha512-sv6AaVgU/eE6u+6WFiQVDcPPwTxP6IJMSB9k701W2r/r6Tx465e8vPvVyRxquNH4Vy6KwRNu90mVbxXJN8+5gg==", + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.79.0.tgz", + "integrity": "sha512-iFZL02deziHslb3jEX9KdqlAkYoo4fGyotchKDzdfK1f5mxlIBeiQeHhvK3iFpuEJSB4ma/qeFn9oxPiwnhUPQ==", + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.79.0.tgz", + "integrity": "sha512-3DtZR2raqObnh7wXZoFYFd0Fw7skBvcb3f7A+/lkEiDuh8hrE6vv9b/62Qxao1a9/OeHLw/FcXlXzgsW9wTRFg==", + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.79.0.tgz", + "integrity": "sha512-Oatt4GuA1WJkqzk2ozx4HrWROOi7opV3AKDw/U8qDIqeTqzsjn5K2x3REJMNjU3/KU/Bkq96Zi3CknaiDTaC/Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.79.0.tgz", + "integrity": "sha512-NAgZr9Qp8nIA9rpo0JEvwiabTF/2UVqBNnupBG9X4kxXcQoScJUTi+qHhvabb9s/thgj5wQ4XcIaJvb+ZMgoKw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.79.0.tgz", + "integrity": "sha512-+KyXjIvcpaXmWW/j9NNY5yWjrIVxaX18VyIheQy3jwc2GSYgpCr7MGI/HxIGQ/shAL5IWEKbhsqoMpAO5Stiog==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.79.0.tgz", + "integrity": "sha512-mEelcCMMBS57sIXh2veGMNy+pQwuGtcMxHxGIZWQ5Ba9pJ5jCCUFOZB9E2JhBaxGsURe+WGe0zJp4RVre52gpQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.67.0.tgz", + "integrity": "sha512-Un7Heoyj65NREbKAyIrFxeM143NZpExWmy1Nep4DLeQOeLlTeumPjoNKnBrU5D5moWXbPJgRa5Uwcdu0faVNGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.67.0", + "@typescript-eslint/type-utils": "8.67.0", + "@typescript-eslint/utils": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.67.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.67.0.tgz", + "integrity": "sha512-fUBfTuuEulWqX6V8+O3PtScV01tzYYRUDTAirHFKoRAt7nOzoGiPt0M/bB47wWNy0coOOcgEwAMUtBpykMxl6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.67.0", + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.67.0.tgz", + "integrity": "sha512-cvE8c7ulYeXN9fYuszhCeCsbzyVEXuhrRCybnBre7TUmqb5nRmBfQAwCj0O3WJFDeyAZt4VYv51vMCC9LHSdYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.67.0", + "@typescript-eslint/types": "^8.67.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.67.0.tgz", + "integrity": "sha512-EgvsleTwS4E+WzzSvem8fAUubLwatMNF1B5hHSLQxcvs7q2dtRhGyujHwLJSYlG41niJ7GP24Aha2+0mb1b2kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.67.0.tgz", + "integrity": "sha512-vV+LUSv5njUWsknE71fqKTlXUva+R76SaeORd6Zojcunk/6DvKFXONU3BrAs2H49mbygUXt6gbYunzwqNwlhdg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.67.0.tgz", + "integrity": "sha512-aVWDXbRmdXO9siTfX4ditQI1T9+zVcNazT48EJCD0v40/9RIFoUgZ05CmGEq9H2gixRpjUn/iplwvlcvutJW/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0", + "@typescript-eslint/utils": "8.67.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.67.0.tgz", + "integrity": "sha512-sBtgslww8nsMYUjhdPBiSyUqSzT8uR6g93A2QXnQC8+cGdjz0CyaOdqHDRJb1AtORbZCNUJBBeFA/tNR2uQmww==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.67.0.tgz", + "integrity": "sha512-EKQBCE9yNlRJYm7jdTW5AhDacDUmSwQb0FAJAmK2EKYrNXIsa2vxcSZx6PvJ/dEdI6lS+Y9W+EXckLj0iPFGcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.67.0", + "@typescript-eslint/tsconfig-utils": "8.67.0", + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/visitor-keys": "8.67.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.67.0.tgz", + "integrity": "sha512-U9D1FdwEWBwok3hxxSdhclMb0twvt9QnjIQ0VfQ1AiX2epnpSgv2ubVDsayOFyY8K6FX+AQ7E0FKWVG3iKsj1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.67.0", + "@typescript-eslint/types": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.67.0.tgz", + "integrity": "sha512-fkv8dHRDqfGtTHuJeebdrQ7cX6Ad4WAS00rgHh9UGvMycF1mjBfsxry1XsLIFhWZ6Judlh6UdzK+TYlbpCXgnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.67.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "license": "ISC" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.8.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.8.1.tgz", + "integrity": "sha512-wqA7W2jbsC/BnV9Iv1UZpKVFkO1AdNoSmYW8NWG4HNOBbkAMvIqDZ27pI2f07dqn583NcIC44ckjAcOXDL1QbQ==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "17.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.11.0.tgz", + "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abi": { + "version": "3.94.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.94.0.tgz", + "integrity": "sha512-W5ZNO5KRPB5TkYmGVD9F6YqhsglXJzE6etpbmT+f6EQElhiX/UTG551cnsRGvLG3fyZEg9HwaDmNmj5nwJ4z9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.9.2.tgz", + "integrity": "sha512-VijLXbi3UACN69I0JVXJsX4tjACjNoQDgv2gTF6sx2wWEi8tkSg2eX8p5gSIFi8z2+DL3oHmY6OyKce38SDolg==", + "license": "MIT", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/oxlint": { + "version": "1.79.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.79.0.tgz", + "integrity": "sha512-hVJ9hq9m2unPS+Of4eJJgCPdIeCC+3DHEUX3tkmrPJr3OK2hz7PhXwgC+ZP71ZcYu8cCDEtQrqLxWNvxBppBVg==", + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.79.0", + "@oxlint/binding-android-arm64": "1.79.0", + "@oxlint/binding-darwin-arm64": "1.79.0", + "@oxlint/binding-darwin-x64": "1.79.0", + "@oxlint/binding-freebsd-x64": "1.79.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.79.0", + "@oxlint/binding-linux-arm-musleabihf": "1.79.0", + "@oxlint/binding-linux-arm64-gnu": "1.79.0", + "@oxlint/binding-linux-arm64-musl": "1.79.0", + "@oxlint/binding-linux-ppc64-gnu": "1.79.0", + "@oxlint/binding-linux-riscv64-gnu": "1.79.0", + "@oxlint/binding-linux-riscv64-musl": "1.79.0", + "@oxlint/binding-linux-s390x-gnu": "1.79.0", + "@oxlint/binding-linux-x64-gnu": "1.79.0", + "@oxlint/binding-linux-x64-musl": "1.79.0", + "@oxlint/binding-openharmony-arm64": "1.79.0", + "@oxlint/binding-win32-arm64-msvc": "1.79.0", + "@oxlint/binding-win32-ia32-msvc": "1.79.0", + "@oxlint/binding-win32-x64-msvc": "1.79.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=7.0.2001", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prebuildify": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/prebuildify/-/prebuildify-6.0.1.tgz", + "integrity": "sha512-8Y2oOOateom/s8dNBsGIcnm6AxPmLH4/nanQzL5lQMU+sC0CMhzARZHizwr36pUPLdvBnOkCNQzxg4djuFSgIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "mkdirp-classic": "^0.5.3", + "node-abi": "^3.3.0", + "npm-run-path": "^3.1.0", + "pump": "^3.0.0", + "tar-fs": "^2.1.0" + }, + "bin": { + "prebuildify": "bin.js" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz", + "integrity": "sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tree-sitter": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.25.1.tgz", + "integrity": "sha512-mrcEdkYtHfrK1A6fs3O6FxkBo0Qig5XUXqHhxUOQu0bmPo00QF4XaSx4edpazdHwxnSCjlGKGgIqWdaN4dvTLA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^8.5.0", + "node-gyp-build": "^4.8.4" + } + }, + "node_modules/tree-sitter-cli": { + "version": "0.26.12", + "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.26.12.tgz", + "integrity": "sha512-rIdMAm6nv75MVFoZ7UTaLVB1OG5h3ZSlCZEp5pne4gOUTalJIkL0A1NlYBg0oEl/d7gvIyc2Y5Jz8m5Xj+NOEw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "tree-sitter": "cli.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.67.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.67.0.tgz", + "integrity": "sha512-S2udFs8tCKEKffuJ4TB1idGUZiXdCPGi3IPBGWXarbLQ5UPXORV8QEVzJ4gCRduURMb5EkpNCdjbk0eDIuI8Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.67.0", + "@typescript-eslint/parser": "8.67.0", + "@typescript-eslint/typescript-estree": "8.67.0", + "@typescript-eslint/utils": "8.67.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/features/tree-sitter-mathic/package.json b/features/tree-sitter-mathic/package.json new file mode 100644 index 0000000..b9861be --- /dev/null +++ b/features/tree-sitter-mathic/package.json @@ -0,0 +1,61 @@ +{ + "name": "tree-sitter-mathic", + "version": "0.1.0", + "description": "tree-sitter for Mathic's grammar", + "type": "module", + "repository": { + "type": "git", + "url": "git+https://github.com/francogiachetta/mathic.git" + }, + "funding": "", + "license": "Apache", + "author": { + "name": "Franco Giachetta", + "email": "francogiachetta27@gmail.com", + "url": "" + }, + "main": "bindings/node", + "types": "bindings/node", + "keywords": [ + "incremental", + "parsing", + "tree-sitter", + "mathic" + ], + "files": [ + "grammar.js", + "tree-sitter.json", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**", + "*.wasm" + ], + "dependencies": { + "node-addon-api": "^8.5.0", + "node-gyp-build": "^4.8.4" + }, + "devDependencies": { + "eslint": "^10.8.1", + "globals": "^17.11.0", + "prebuildify": "^6.0.1", + "tree-sitter": "^0.25.0", + "tree-sitter-cli": "^0.26.7", + "typescript-eslint": "^8.67.0" + }, + "peerDependencies": { + "tree-sitter": "^0.25.0" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + }, + "scripts": { + "install": "node-gyp-build", + "prestart": "tree-sitter build --wasm", + "start": "tree-sitter playground", + "test": "node --test bindings/node/*_test.js" + } +} \ No newline at end of file diff --git a/features/tree-sitter-mathic/pyproject.toml b/features/tree-sitter-mathic/pyproject.toml new file mode 100644 index 0000000..eceb8ae --- /dev/null +++ b/features/tree-sitter-mathic/pyproject.toml @@ -0,0 +1,30 @@ +[build-system] +requires = ["setuptools>=62.4.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-mathic" +description = "tree-sitter for Mathic's grammar" +version = "0.1.0" +keywords = ["incremental", "parsing", "tree-sitter", "mathic"] +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed", +] +authors = [{ name = "Franco Giachetta", email = "francogiachetta27@gmail.com" }] +requires-python = ">=3.10" +license.text = "Apache" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/francogiachetta/mathic" +Funding = "" + +[project.optional-dependencies] +core = ["tree-sitter~=0.24"] + +[tool.cibuildwheel] +build = "cp310-*" +build-frontend = "build" diff --git a/features/tree-sitter-mathic/queries/highlights.scm b/features/tree-sitter-mathic/queries/highlights.scm new file mode 100644 index 0000000..208b63a --- /dev/null +++ b/features/tree-sitter-mathic/queries/highlights.scm @@ -0,0 +1,106 @@ +; Identifier + +(IDENT) @variable +(field_identifier) @variable.parameter +(path_identifier) @variable +(type_identifier) @type +(native_type) @type.builtin + +; Assume that uppercase identifiers are types +((IDENT) @type + (#match? @type "^[A-Z]")) +((path_identifier) @type + (#match? @type "^[A-Z]")) + +; Assume that path tails are functions +(path + (path_identifier)* + (path + tail: (path_identifier) @function)) + +; Functions + +(func_decl + name: (IDENT) @function) +(func_decl + params: (param_list + (IDENT) @variable.parameter)) + +(call_expression + (primary + (path + tail: (path_identifier) @function)) + "(") + +(substitution_args + sym: (IDENT) @function) + +; Struct + +(struct_init + (IDENT) @variable.parameter) +(struct_fields + (IDENT) @variable.parameter) + +; Keywords + +[ + "imp" + "df" + "struct" + "let" + "sym" + "for" + "in" + "while" + "if" + "else" + "return" + "or" + "and" +] @keyword + +; Literals + +(STRING) @string +(NUM) @constant.numeric + +[ + "true" + "false" +] @constant.builtin + +; Operators + +[ + "+" + "-" + "*" + "/" + "=" + "==" + "!" + "!=" + ">" + "<" + ">=" + "<=" +] @operator + +(comment) @comment + +[ + "," + ";" + ":" + "::" +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket diff --git a/features/tree-sitter-mathic/queries/locals.scm b/features/tree-sitter-mathic/queries/locals.scm new file mode 100644 index 0000000..89743ac --- /dev/null +++ b/features/tree-sitter-mathic/queries/locals.scm @@ -0,0 +1,33 @@ +; Scopes + +(func_decl) @local.scope +(for_stmt) @local.scope +(block) @local.scope + +; Definitions + +(func_decl + name: (IDENT) @local.definition.function) + +(struct_decl + name: (IDENT) @local.definition.type) + +(param_list + (IDENT) @local.definition.parameter) + +(var_decl + name: (IDENT) @local.definition.var) + +(sym_decl + name: (IDENT) @local.definition.var) + +(for_stmt + . (IDENT) @local.definition.var) + +; References + +(assignment + lhs: (IDENT) @local.reference) + +(primary + (path) @local.reference) diff --git a/features/tree-sitter-mathic/setup.py b/features/tree-sitter-mathic/setup.py new file mode 100644 index 0000000..ab49f8d --- /dev/null +++ b/features/tree-sitter-mathic/setup.py @@ -0,0 +1,77 @@ +from os import path +from sysconfig import get_config_var + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from setuptools.command.build_ext import build_ext +from setuptools.command.egg_info import egg_info +from wheel.bdist_wheel import bdist_wheel + + +class Build(build): + def run(self): + if path.isdir("queries"): + dest = path.join(self.build_lib, "tree_sitter_mathic", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BuildExt(build_ext): + def build_extension(self, ext: Extension): + if self.compiler.compiler_type != "msvc": + ext.extra_compile_args = ["-std=c11", "-fvisibility=hidden"] + else: + ext.extra_compile_args = ["/std:c11", "/utf-8"] + if path.exists("src/scanner.c"): + ext.sources.append("src/scanner.c") + if ext.py_limited_api: + ext.define_macros.append(("Py_LIMITED_API", "0x030A0000")) + super().build_extension(ext) + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp") and not get_config_var("Py_GIL_DISABLED"): + python, abi = "cp310", "abi3" + return python, abi, platform + + +class EggInfo(egg_info): + def find_sources(self): + super().find_sources() + self.filelist.recursive_include("queries", "*.scm") + self.filelist.include("src/tree_sitter/*.h") + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_mathic": ["*.pyi", "py.typed"], + "tree_sitter_mathic.queries": ["*.scm"], + }, + ext_package="tree_sitter_mathic", + ext_modules=[ + Extension( + name="_binding", + sources=[ + "bindings/python/tree_sitter_mathic/binding.c", + "src/parser.c", + ], + define_macros=[ + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), + ], + include_dirs=["src"], + py_limited_api=not get_config_var("Py_GIL_DISABLED"), + ) + ], + cmdclass={ + "build": Build, + "build_ext": BuildExt, + "bdist_wheel": BdistWheel, + "egg_info": EggInfo, + }, + zip_safe=False +) diff --git a/features/tree-sitter-mathic/src/grammar.json b/features/tree-sitter-mathic/src/grammar.json new file mode 100644 index 0000000..b087ad6 --- /dev/null +++ b/features/tree-sitter-mathic/src/grammar.json @@ -0,0 +1,1743 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", + "name": "mathic", + "word": "IDENT", + "rules": { + "program": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "top_decl" + } + }, + "top_decl": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "func_decl" + }, + { + "type": "SYMBOL", + "name": "struct_decl" + }, + { + "type": "SYMBOL", + "name": "imports_decls" + } + ] + }, + "imports_decls": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "imp" + }, + { + "type": "SYMBOL", + "name": "import_path" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "func_decl": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "df" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "IDENT" + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "params", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "param_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "struct_decl": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "struct" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "IDENT" + } + }, + { + "type": "STRING", + "value": "{" + }, + { + "type": "FIELD", + "name": "fields", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "struct_fields" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "declaration": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "func_decl" + }, + { + "type": "SYMBOL", + "name": "struct_decl" + }, + { + "type": "SYMBOL", + "name": "var_decl" + }, + { + "type": "SYMBOL", + "name": "sym_decl" + } + ] + }, + "var_decl": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "IDENT" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "sym_decl": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "sym" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "IDENT" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "stmt": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "declaration" + }, + { + "type": "SYMBOL", + "name": "for_stmt" + }, + { + "type": "SYMBOL", + "name": "while_stmt" + }, + { + "type": "SYMBOL", + "name": "if_stmt" + }, + { + "type": "SYMBOL", + "name": "return_stmt" + }, + { + "type": "SYMBOL", + "name": "expr_stmt" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + "for_stmt": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "SYMBOL", + "name": "expression_no_assign" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "loop_body", + "content": { + "type": "SYMBOL", + "name": "block" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ".." + }, + { + "type": "SYMBOL", + "name": "expression_no_assign" + }, + { + "type": "FIELD", + "name": "loop_body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + } + ] + } + ] + }, + "while_stmt": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "then_body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "if_stmt": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "then_body", + "content": { + "type": "SYMBOL", + "name": "block" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "FIELD", + "name": "else_body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "return_stmt": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "expr_stmt": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "stmt" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "assignment_expression" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "non_binary_expression" + } + ] + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "or" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "and" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "==" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "!=" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "<" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": ">" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "<=" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": ">=" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "+" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "-" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "*" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + }, + { + "type": "FIELD", + "name": "operation", + "content": { + "type": "STRING", + "value": "/" + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression_no_assign" + } + } + ] + } + } + ] + }, + "non_binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "unary_expression" + }, + { + "type": "SYMBOL", + "name": "call_expression" + } + ] + }, + "assignment_expression": { + "type": "PREC_RIGHT", + "value": -1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "assignment" + }, + { + "type": "SYMBOL", + "name": "initializer" + } + ] + } + }, + "assignment": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "field_access" + } + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "initializer": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression_no_assign" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "struct_init" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "expression_no_assign": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "non_binary_expression" + } + ] + }, + "unary_expression": { + "type": "PREC_RIGHT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "STRING", + "value": "-" + } + ] + } + }, + { + "type": "FIELD", + "name": "rhs", + "content": { + "type": "SYMBOL", + "name": "non_binary_expression" + } + } + ] + } + }, + "call_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "callee", + "content": { + "type": "SYMBOL", + "name": "primary" + } + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "args_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_access" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "bracket_args" + }, + { + "type": "STRING", + "value": "]" + } + ] + } + ] + } + } + ] + }, + "bracket_args": { + "type": "SYMBOL", + "name": "substitution_args" + }, + "struct_init": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "substitution_args": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "sym", + "content": { + "type": "SYMBOL", + "name": "IDENT" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "sym", + "content": { + "type": "SYMBOL", + "name": "IDENT" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + }, + "primary": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + }, + { + "type": "SYMBOL", + "name": "path" + }, + { + "type": "SYMBOL", + "name": "NUM" + }, + { + "type": "SYMBOL", + "name": "STRING" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "param_list": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + "struct_fields": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "pub" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "pub" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + "args_list": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + }, + "import_path": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "IDENT" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "::" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "import_path" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "import_path" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "import_path" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "path": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "head", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_path_identifier" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "path" + } + ] + } + }, + { + "type": "FIELD", + "name": "tail", + "content": { + "type": "SYMBOL", + "name": "_path_identifier" + } + } + ] + }, + "field_access": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "SYMBOL", + "name": "_field_identifier" + } + } + ] + }, + "_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "bracket_type" + }, + { + "type": "SYMBOL", + "name": "native_type" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + } + ] + }, + "native_type": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isz" + }, + { + "type": "STRING", + "value": "usz" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + }, + { + "type": "STRING", + "value": "expr" + } + ] + }, + "bracket_type": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "path" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ">" + } + ] + } + ] + }, + "IDENT": { + "type": "PATTERN", + "value": "[\\p{XID_Start}_]\\p{XID_Continue}*" + }, + "NUM": { + "type": "TOKEN", + "content": { + "type": "PATTERN", + "value": "0|[1-9]\\d*(\\.\\d+)?" + } + }, + "STRING": { + "type": "PATTERN", + "value": "\"[^\"]*\"" + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "//" + }, + { + "type": "PATTERN", + "value": ".*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/*" + }, + { + "type": "PATTERN", + "value": "[^*]*\\*+([^/*][^*]*\\*+)*" + }, + { + "type": "STRING", + "value": "/" + } + ] + } + ] + } + }, + "_field_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "IDENT" + }, + "named": true, + "value": "field_identifier" + }, + "_type_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "IDENT" + }, + "named": true, + "value": "type_identifier" + }, + "_path_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "IDENT" + }, + "named": true, + "value": "path_identifier" + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s|\\\\\\r?\\n" + }, + { + "type": "SYMBOL", + "name": "comment" + } + ], + "conflicts": [ + [ + "assignment", + "_path_identifier" + ], + [ + "expression", + "expression_no_assign" + ] + ], + "precedences": [], + "externals": [], + "inline": [ + "_field_identifier", + "bracket_type", + "_type_identifier" + ], + "supertypes": [ + "top_decl", + "declaration", + "stmt", + "expression", + "expression_no_assign", + "non_binary_expression" + ], + "reserved": {} +} \ No newline at end of file diff --git a/features/tree-sitter-mathic/src/node-types.json b/features/tree-sitter-mathic/src/node-types.json new file mode 100644 index 0000000..babe4d1 --- /dev/null +++ b/features/tree-sitter-mathic/src/node-types.json @@ -0,0 +1,1182 @@ +[ + { + "type": "declaration", + "named": true, + "subtypes": [ + { + "type": "func_decl", + "named": true + }, + { + "type": "struct_decl", + "named": true + }, + { + "type": "sym_decl", + "named": true + }, + { + "type": "var_decl", + "named": true + } + ] + }, + { + "type": "expression", + "named": true, + "subtypes": [ + { + "type": "assignment_expression", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "non_binary_expression", + "named": true + } + ] + }, + { + "type": "expression_no_assign", + "named": true, + "subtypes": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "non_binary_expression", + "named": true + } + ] + }, + { + "type": "non_binary_expression", + "named": true, + "subtypes": [ + { + "type": "call_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + }, + { + "type": "stmt", + "named": true, + "subtypes": [ + { + "type": "block", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "expr_stmt", + "named": true + }, + { + "type": "for_stmt", + "named": true + }, + { + "type": "if_stmt", + "named": true + }, + { + "type": "return_stmt", + "named": true + }, + { + "type": "while_stmt", + "named": true + } + ] + }, + { + "type": "top_decl", + "named": true, + "subtypes": [ + { + "type": "func_decl", + "named": true + }, + { + "type": "imports_decls", + "named": true + }, + { + "type": "struct_decl", + "named": true + } + ] + }, + { + "type": "args_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "assignment", + "named": true, + "fields": { + "lhs": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + }, + { + "type": "field_access", + "named": true + } + ] + }, + "rhs": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "assignment_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "assignment", + "named": true + }, + { + "type": "initializer", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": { + "lhs": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression_no_assign", + "named": true + } + ] + }, + "operation": { + "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 + }, + { + "type": "and", + "named": false + }, + { + "type": "or", + "named": false + } + ] + }, + "rhs": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression_no_assign", + "named": true + } + ] + } + } + }, + { + "type": "block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "stmt", + "named": true + } + ] + } + }, + { + "type": "bracket_args", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "substitution_args", + "named": true + } + ] + } + }, + { + "type": "call_expression", + "named": true, + "fields": { + "arguments": { + "multiple": true, + "required": false, + "types": [ + { + "type": "args_list", + "named": true + } + ] + }, + "callee": { + "multiple": false, + "required": true, + "types": [ + { + "type": "primary", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "bracket_args", + "named": true + }, + { + "type": "field_access", + "named": true + } + ] + } + }, + { + "type": "expr_stmt", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "field_access", + "named": true, + "fields": { + "field": { + "multiple": false, + "required": true, + "types": [ + { + "type": "field_identifier", + "named": true + } + ] + } + } + }, + { + "type": "for_stmt", + "named": true, + "fields": { + "loop_body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + }, + { + "type": "expression_no_assign", + "named": true + } + ] + } + }, + { + "type": "func_decl", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + } + ] + }, + "params": { + "multiple": false, + "required": false, + "types": [ + { + "type": "param_list", + "named": true + } + ] + }, + "return_type": { + "multiple": true, + "required": false, + "types": [ + { + "type": "<", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": "native_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + } + } + }, + { + "type": "if_stmt", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression_no_assign", + "named": true + } + ] + }, + "else_body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block", + "named": true + } + ] + }, + "then_body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "named": true + } + ] + } + } + }, + { + "type": "import_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + }, + { + "type": "import_path", + "named": true + } + ] + } + }, + { + "type": "imports_decls", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "import_path", + "named": true + } + ] + } + }, + { + "type": "initializer", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression_no_assign", + "named": true + }, + { + "type": "struct_init", + "named": true + } + ] + } + }, + { + "type": "native_type", + "named": true, + "fields": {} + }, + { + "type": "param_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + }, + { + "type": "native_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + } + }, + { + "type": "path", + "named": true, + "fields": { + "head": { + "multiple": true, + "required": false, + "types": [ + { + "type": "::", + "named": false + }, + { + "type": "path", + "named": true + }, + { + "type": "path_identifier", + "named": true + } + ] + }, + "tail": { + "multiple": false, + "required": false, + "types": [ + { + "type": "path_identifier", + "named": true + } + ] + } + } + }, + { + "type": "primary", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "NUM", + "named": true + }, + { + "type": "STRING", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "path", + "named": true + } + ] + } + }, + { + "type": "program", + "named": true, + "root": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "top_decl", + "named": true + } + ] + } + }, + { + "type": "return_stmt", + "named": true, + "fields": { + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "struct_decl", + "named": true, + "fields": { + "fields": { + "multiple": false, + "required": false, + "types": [ + { + "type": "struct_fields", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + } + ] + } + } + }, + { + "type": "struct_fields", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + }, + { + "type": "native_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + } + }, + { + "type": "struct_init", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + }, + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "substitution_args", + "named": true, + "fields": { + "sym": { + "multiple": true, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "sym_decl", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": true, + "types": [ + { + "type": "<", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": "native_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + } + } + }, + { + "type": "unary_expression", + "named": true, + "fields": { + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "!", + "named": false + }, + { + "type": "-", + "named": false + } + ] + }, + "rhs": { + "multiple": false, + "required": true, + "types": [ + { + "type": "non_binary_expression", + "named": true + } + ] + } + } + }, + { + "type": "var_decl", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "IDENT", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": true, + "types": [ + { + "type": "<", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": "native_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "type_identifier", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "while_stmt", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression_no_assign", + "named": true + } + ] + }, + "then_body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block", + "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": "IDENT", + "named": true + }, + { + "type": "NUM", + "named": true + }, + { + "type": "STRING", + "named": true + }, + { + "type": "[", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "and", + "named": false + }, + { + "type": "bool", + "named": false + }, + { + "type": "char", + "named": false + }, + { + "type": "comment", + "named": true, + "extra": true + }, + { + "type": "df", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "expr", + "named": false + }, + { + "type": "f32", + "named": false + }, + { + "type": "f64", + "named": false + }, + { + "type": "false", + "named": false + }, + { + "type": "field_identifier", + "named": true + }, + { + "type": "for", + "named": false + }, + { + "type": "i128", + "named": false + }, + { + "type": "i16", + "named": false + }, + { + "type": "i32", + "named": false + }, + { + "type": "i64", + "named": false + }, + { + "type": "i8", + "named": false + }, + { + "type": "if", + "named": false + }, + { + "type": "imp", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "isz", + "named": false + }, + { + "type": "let", + "named": false + }, + { + "type": "or", + "named": false + }, + { + "type": "path_identifier", + "named": true + }, + { + "type": "pub", + "named": false + }, + { + "type": "return", + "named": false + }, + { + "type": "str", + "named": false + }, + { + "type": "struct", + "named": false + }, + { + "type": "sym", + "named": false + }, + { + "type": "true", + "named": false + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "u128", + "named": false + }, + { + "type": "u16", + "named": false + }, + { + "type": "u32", + "named": false + }, + { + "type": "u64", + "named": false + }, + { + "type": "u8", + "named": false + }, + { + "type": "usz", + "named": false + }, + { + "type": "while", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "}", + "named": false + } +] \ No newline at end of file diff --git a/features/tree-sitter-mathic/src/parser.c b/features/tree-sitter-mathic/src/parser.c new file mode 100644 index 0000000..947502c --- /dev/null +++ b/features/tree-sitter-mathic/src/parser.c @@ -0,0 +1,6496 @@ +/* Automatically @generated by tree-sitter */ + +#include "tree_sitter/parser.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 15 +#define STATE_COUNT 208 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 110 +#define ALIAS_COUNT 3 +#define TOKEN_COUNT 63 +#define EXTERNAL_TOKEN_COUNT 0 +#define FIELD_COUNT 21 +#define MAX_ALIAS_SEQUENCE_LENGTH 7 +#define MAX_RESERVED_WORD_SET_SIZE 0 +#define PRODUCTION_ID_COUNT 31 +#define SUPERTYPE_COUNT 6 + +enum ts_symbol_identifiers { + sym_IDENT = 1, + anon_sym_imp = 2, + anon_sym_SEMI = 3, + anon_sym_df = 4, + anon_sym_LPAREN = 5, + anon_sym_RPAREN = 6, + anon_sym_struct = 7, + anon_sym_LBRACE = 8, + anon_sym_RBRACE = 9, + anon_sym_let = 10, + anon_sym_COLON = 11, + anon_sym_EQ = 12, + anon_sym_sym = 13, + anon_sym_for = 14, + anon_sym_in = 15, + anon_sym_DOT_DOT = 16, + anon_sym_while = 17, + anon_sym_if = 18, + anon_sym_else = 19, + anon_sym_return = 20, + anon_sym_or = 21, + anon_sym_and = 22, + anon_sym_EQ_EQ = 23, + anon_sym_BANG_EQ = 24, + anon_sym_LT = 25, + anon_sym_GT = 26, + anon_sym_LT_EQ = 27, + anon_sym_GT_EQ = 28, + anon_sym_PLUS = 29, + anon_sym_DASH = 30, + anon_sym_STAR = 31, + anon_sym_SLASH = 32, + anon_sym_BANG = 33, + anon_sym_LBRACK = 34, + anon_sym_RBRACK = 35, + anon_sym_COMMA = 36, + anon_sym_true = 37, + anon_sym_false = 38, + anon_sym_pub = 39, + anon_sym_COLON_COLON = 40, + anon_sym_DOT = 41, + anon_sym_u8 = 42, + anon_sym_i8 = 43, + anon_sym_u16 = 44, + anon_sym_i16 = 45, + anon_sym_u32 = 46, + anon_sym_i32 = 47, + anon_sym_u64 = 48, + anon_sym_i64 = 49, + anon_sym_u128 = 50, + anon_sym_i128 = 51, + anon_sym_isz = 52, + anon_sym_usz = 53, + anon_sym_f32 = 54, + anon_sym_f64 = 55, + anon_sym_bool = 56, + anon_sym_str = 57, + anon_sym_char = 58, + anon_sym_expr = 59, + sym_NUM = 60, + sym_STRING = 61, + sym_comment = 62, + sym_program = 63, + sym_top_decl = 64, + sym_imports_decls = 65, + sym_func_decl = 66, + sym_struct_decl = 67, + sym_declaration = 68, + sym_var_decl = 69, + sym_sym_decl = 70, + sym_stmt = 71, + sym_for_stmt = 72, + sym_while_stmt = 73, + sym_if_stmt = 74, + sym_return_stmt = 75, + sym_expr_stmt = 76, + sym_block = 77, + sym_expression = 78, + sym_binary_expression = 79, + sym_non_binary_expression = 80, + sym_assignment_expression = 81, + sym_assignment = 82, + sym_initializer = 83, + sym_expression_no_assign = 84, + sym_unary_expression = 85, + sym_call_expression = 86, + sym_bracket_args = 87, + sym_struct_init = 88, + sym_substitution_args = 89, + sym_primary = 90, + sym_param_list = 91, + sym_struct_fields = 92, + sym_args_list = 93, + sym_import_path = 94, + sym_path = 95, + sym_field_access = 96, + sym__type = 97, + sym_native_type = 98, + sym__path_identifier = 99, + aux_sym_program_repeat1 = 100, + aux_sym_block_repeat1 = 101, + aux_sym_assignment_repeat1 = 102, + aux_sym_call_expression_repeat1 = 103, + aux_sym_struct_init_repeat1 = 104, + aux_sym_substitution_args_repeat1 = 105, + aux_sym_param_list_repeat1 = 106, + aux_sym_struct_fields_repeat1 = 107, + aux_sym_args_list_repeat1 = 108, + aux_sym_import_path_repeat1 = 109, + alias_sym_field_identifier = 110, + alias_sym_path_identifier = 111, + alias_sym_type_identifier = 112, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym_IDENT] = "IDENT", + [anon_sym_imp] = "imp", + [anon_sym_SEMI] = ";", + [anon_sym_df] = "df", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_struct] = "struct", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_let] = "let", + [anon_sym_COLON] = ":", + [anon_sym_EQ] = "=", + [anon_sym_sym] = "sym", + [anon_sym_for] = "for", + [anon_sym_in] = "in", + [anon_sym_DOT_DOT] = "..", + [anon_sym_while] = "while", + [anon_sym_if] = "if", + [anon_sym_else] = "else", + [anon_sym_return] = "return", + [anon_sym_or] = "or", + [anon_sym_and] = "and", + [anon_sym_EQ_EQ] = "==", + [anon_sym_BANG_EQ] = "!=", + [anon_sym_LT] = "<", + [anon_sym_GT] = ">", + [anon_sym_LT_EQ] = "<=", + [anon_sym_GT_EQ] = ">=", + [anon_sym_PLUS] = "+", + [anon_sym_DASH] = "-", + [anon_sym_STAR] = "*", + [anon_sym_SLASH] = "/", + [anon_sym_BANG] = "!", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_COMMA] = ",", + [anon_sym_true] = "true", + [anon_sym_false] = "false", + [anon_sym_pub] = "pub", + [anon_sym_COLON_COLON] = "::", + [anon_sym_DOT] = ".", + [anon_sym_u8] = "u8", + [anon_sym_i8] = "i8", + [anon_sym_u16] = "u16", + [anon_sym_i16] = "i16", + [anon_sym_u32] = "u32", + [anon_sym_i32] = "i32", + [anon_sym_u64] = "u64", + [anon_sym_i64] = "i64", + [anon_sym_u128] = "u128", + [anon_sym_i128] = "i128", + [anon_sym_isz] = "isz", + [anon_sym_usz] = "usz", + [anon_sym_f32] = "f32", + [anon_sym_f64] = "f64", + [anon_sym_bool] = "bool", + [anon_sym_str] = "str", + [anon_sym_char] = "char", + [anon_sym_expr] = "expr", + [sym_NUM] = "NUM", + [sym_STRING] = "STRING", + [sym_comment] = "comment", + [sym_program] = "program", + [sym_top_decl] = "top_decl", + [sym_imports_decls] = "imports_decls", + [sym_func_decl] = "func_decl", + [sym_struct_decl] = "struct_decl", + [sym_declaration] = "declaration", + [sym_var_decl] = "var_decl", + [sym_sym_decl] = "sym_decl", + [sym_stmt] = "stmt", + [sym_for_stmt] = "for_stmt", + [sym_while_stmt] = "while_stmt", + [sym_if_stmt] = "if_stmt", + [sym_return_stmt] = "return_stmt", + [sym_expr_stmt] = "expr_stmt", + [sym_block] = "block", + [sym_expression] = "expression", + [sym_binary_expression] = "binary_expression", + [sym_non_binary_expression] = "non_binary_expression", + [sym_assignment_expression] = "assignment_expression", + [sym_assignment] = "assignment", + [sym_initializer] = "initializer", + [sym_expression_no_assign] = "expression_no_assign", + [sym_unary_expression] = "unary_expression", + [sym_call_expression] = "call_expression", + [sym_bracket_args] = "bracket_args", + [sym_struct_init] = "struct_init", + [sym_substitution_args] = "substitution_args", + [sym_primary] = "primary", + [sym_param_list] = "param_list", + [sym_struct_fields] = "struct_fields", + [sym_args_list] = "args_list", + [sym_import_path] = "import_path", + [sym_path] = "path", + [sym_field_access] = "field_access", + [sym__type] = "_type", + [sym_native_type] = "native_type", + [sym__path_identifier] = "_path_identifier", + [aux_sym_program_repeat1] = "program_repeat1", + [aux_sym_block_repeat1] = "block_repeat1", + [aux_sym_assignment_repeat1] = "assignment_repeat1", + [aux_sym_call_expression_repeat1] = "call_expression_repeat1", + [aux_sym_struct_init_repeat1] = "struct_init_repeat1", + [aux_sym_substitution_args_repeat1] = "substitution_args_repeat1", + [aux_sym_param_list_repeat1] = "param_list_repeat1", + [aux_sym_struct_fields_repeat1] = "struct_fields_repeat1", + [aux_sym_args_list_repeat1] = "args_list_repeat1", + [aux_sym_import_path_repeat1] = "import_path_repeat1", + [alias_sym_field_identifier] = "field_identifier", + [alias_sym_path_identifier] = "path_identifier", + [alias_sym_type_identifier] = "type_identifier", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym_IDENT] = sym_IDENT, + [anon_sym_imp] = anon_sym_imp, + [anon_sym_SEMI] = anon_sym_SEMI, + [anon_sym_df] = anon_sym_df, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_struct] = anon_sym_struct, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_let] = anon_sym_let, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_sym] = anon_sym_sym, + [anon_sym_for] = anon_sym_for, + [anon_sym_in] = anon_sym_in, + [anon_sym_DOT_DOT] = anon_sym_DOT_DOT, + [anon_sym_while] = anon_sym_while, + [anon_sym_if] = anon_sym_if, + [anon_sym_else] = anon_sym_else, + [anon_sym_return] = anon_sym_return, + [anon_sym_or] = anon_sym_or, + [anon_sym_and] = anon_sym_and, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_BANG] = anon_sym_BANG, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_true] = anon_sym_true, + [anon_sym_false] = anon_sym_false, + [anon_sym_pub] = anon_sym_pub, + [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_u8] = anon_sym_u8, + [anon_sym_i8] = anon_sym_i8, + [anon_sym_u16] = anon_sym_u16, + [anon_sym_i16] = anon_sym_i16, + [anon_sym_u32] = anon_sym_u32, + [anon_sym_i32] = anon_sym_i32, + [anon_sym_u64] = anon_sym_u64, + [anon_sym_i64] = anon_sym_i64, + [anon_sym_u128] = anon_sym_u128, + [anon_sym_i128] = anon_sym_i128, + [anon_sym_isz] = anon_sym_isz, + [anon_sym_usz] = anon_sym_usz, + [anon_sym_f32] = anon_sym_f32, + [anon_sym_f64] = anon_sym_f64, + [anon_sym_bool] = anon_sym_bool, + [anon_sym_str] = anon_sym_str, + [anon_sym_char] = anon_sym_char, + [anon_sym_expr] = anon_sym_expr, + [sym_NUM] = sym_NUM, + [sym_STRING] = sym_STRING, + [sym_comment] = sym_comment, + [sym_program] = sym_program, + [sym_top_decl] = sym_top_decl, + [sym_imports_decls] = sym_imports_decls, + [sym_func_decl] = sym_func_decl, + [sym_struct_decl] = sym_struct_decl, + [sym_declaration] = sym_declaration, + [sym_var_decl] = sym_var_decl, + [sym_sym_decl] = sym_sym_decl, + [sym_stmt] = sym_stmt, + [sym_for_stmt] = sym_for_stmt, + [sym_while_stmt] = sym_while_stmt, + [sym_if_stmt] = sym_if_stmt, + [sym_return_stmt] = sym_return_stmt, + [sym_expr_stmt] = sym_expr_stmt, + [sym_block] = sym_block, + [sym_expression] = sym_expression, + [sym_binary_expression] = sym_binary_expression, + [sym_non_binary_expression] = sym_non_binary_expression, + [sym_assignment_expression] = sym_assignment_expression, + [sym_assignment] = sym_assignment, + [sym_initializer] = sym_initializer, + [sym_expression_no_assign] = sym_expression_no_assign, + [sym_unary_expression] = sym_unary_expression, + [sym_call_expression] = sym_call_expression, + [sym_bracket_args] = sym_bracket_args, + [sym_struct_init] = sym_struct_init, + [sym_substitution_args] = sym_substitution_args, + [sym_primary] = sym_primary, + [sym_param_list] = sym_param_list, + [sym_struct_fields] = sym_struct_fields, + [sym_args_list] = sym_args_list, + [sym_import_path] = sym_import_path, + [sym_path] = sym_path, + [sym_field_access] = sym_field_access, + [sym__type] = sym__type, + [sym_native_type] = sym_native_type, + [sym__path_identifier] = sym__path_identifier, + [aux_sym_program_repeat1] = aux_sym_program_repeat1, + [aux_sym_block_repeat1] = aux_sym_block_repeat1, + [aux_sym_assignment_repeat1] = aux_sym_assignment_repeat1, + [aux_sym_call_expression_repeat1] = aux_sym_call_expression_repeat1, + [aux_sym_struct_init_repeat1] = aux_sym_struct_init_repeat1, + [aux_sym_substitution_args_repeat1] = aux_sym_substitution_args_repeat1, + [aux_sym_param_list_repeat1] = aux_sym_param_list_repeat1, + [aux_sym_struct_fields_repeat1] = aux_sym_struct_fields_repeat1, + [aux_sym_args_list_repeat1] = aux_sym_args_list_repeat1, + [aux_sym_import_path_repeat1] = aux_sym_import_path_repeat1, + [alias_sym_field_identifier] = alias_sym_field_identifier, + [alias_sym_path_identifier] = alias_sym_path_identifier, + [alias_sym_type_identifier] = alias_sym_type_identifier, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym_IDENT] = { + .visible = true, + .named = true, + }, + [anon_sym_imp] = { + .visible = true, + .named = false, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [anon_sym_df] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_struct] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_let] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_sym] = { + .visible = true, + .named = false, + }, + [anon_sym_for] = { + .visible = true, + .named = false, + }, + [anon_sym_in] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_return] = { + .visible = true, + .named = false, + }, + [anon_sym_or] = { + .visible = true, + .named = false, + }, + [anon_sym_and] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_true] = { + .visible = true, + .named = false, + }, + [anon_sym_false] = { + .visible = true, + .named = false, + }, + [anon_sym_pub] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_u8] = { + .visible = true, + .named = false, + }, + [anon_sym_i8] = { + .visible = true, + .named = false, + }, + [anon_sym_u16] = { + .visible = true, + .named = false, + }, + [anon_sym_i16] = { + .visible = true, + .named = false, + }, + [anon_sym_u32] = { + .visible = true, + .named = false, + }, + [anon_sym_i32] = { + .visible = true, + .named = false, + }, + [anon_sym_u64] = { + .visible = true, + .named = false, + }, + [anon_sym_i64] = { + .visible = true, + .named = false, + }, + [anon_sym_u128] = { + .visible = true, + .named = false, + }, + [anon_sym_i128] = { + .visible = true, + .named = false, + }, + [anon_sym_isz] = { + .visible = true, + .named = false, + }, + [anon_sym_usz] = { + .visible = true, + .named = false, + }, + [anon_sym_f32] = { + .visible = true, + .named = false, + }, + [anon_sym_f64] = { + .visible = true, + .named = false, + }, + [anon_sym_bool] = { + .visible = true, + .named = false, + }, + [anon_sym_str] = { + .visible = true, + .named = false, + }, + [anon_sym_char] = { + .visible = true, + .named = false, + }, + [anon_sym_expr] = { + .visible = true, + .named = false, + }, + [sym_NUM] = { + .visible = true, + .named = true, + }, + [sym_STRING] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [sym_program] = { + .visible = true, + .named = true, + }, + [sym_top_decl] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_imports_decls] = { + .visible = true, + .named = true, + }, + [sym_func_decl] = { + .visible = true, + .named = true, + }, + [sym_struct_decl] = { + .visible = true, + .named = true, + }, + [sym_declaration] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_var_decl] = { + .visible = true, + .named = true, + }, + [sym_sym_decl] = { + .visible = true, + .named = true, + }, + [sym_stmt] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_for_stmt] = { + .visible = true, + .named = true, + }, + [sym_while_stmt] = { + .visible = true, + .named = true, + }, + [sym_if_stmt] = { + .visible = true, + .named = true, + }, + [sym_return_stmt] = { + .visible = true, + .named = true, + }, + [sym_expr_stmt] = { + .visible = true, + .named = true, + }, + [sym_block] = { + .visible = true, + .named = true, + }, + [sym_expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_binary_expression] = { + .visible = true, + .named = true, + }, + [sym_non_binary_expression] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_assignment_expression] = { + .visible = true, + .named = true, + }, + [sym_assignment] = { + .visible = true, + .named = true, + }, + [sym_initializer] = { + .visible = true, + .named = true, + }, + [sym_expression_no_assign] = { + .visible = false, + .named = true, + .supertype = true, + }, + [sym_unary_expression] = { + .visible = true, + .named = true, + }, + [sym_call_expression] = { + .visible = true, + .named = true, + }, + [sym_bracket_args] = { + .visible = true, + .named = true, + }, + [sym_struct_init] = { + .visible = true, + .named = true, + }, + [sym_substitution_args] = { + .visible = true, + .named = true, + }, + [sym_primary] = { + .visible = true, + .named = true, + }, + [sym_param_list] = { + .visible = true, + .named = true, + }, + [sym_struct_fields] = { + .visible = true, + .named = true, + }, + [sym_args_list] = { + .visible = true, + .named = true, + }, + [sym_import_path] = { + .visible = true, + .named = true, + }, + [sym_path] = { + .visible = true, + .named = true, + }, + [sym_field_access] = { + .visible = true, + .named = true, + }, + [sym__type] = { + .visible = false, + .named = true, + }, + [sym_native_type] = { + .visible = true, + .named = true, + }, + [sym__path_identifier] = { + .visible = false, + .named = true, + }, + [aux_sym_program_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_block_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_assignment_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_call_expression_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_struct_init_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_substitution_args_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_param_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_struct_fields_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_args_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_import_path_repeat1] = { + .visible = false, + .named = false, + }, + [alias_sym_field_identifier] = { + .visible = true, + .named = true, + }, + [alias_sym_path_identifier] = { + .visible = true, + .named = true, + }, + [alias_sym_type_identifier] = { + .visible = true, + .named = true, + }, +}; + +enum ts_field_identifiers { + field_arguments = 1, + field_body = 2, + field_callee = 3, + field_condition = 4, + field_else_body = 5, + field_field = 6, + field_fields = 7, + field_head = 8, + field_lhs = 9, + field_loop_body = 10, + field_name = 11, + field_operation = 12, + field_operator = 13, + field_params = 14, + field_return_type = 15, + field_rhs = 16, + field_sym = 17, + field_tail = 18, + field_then_body = 19, + field_type = 20, + field_value = 21, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_arguments] = "arguments", + [field_body] = "body", + [field_callee] = "callee", + [field_condition] = "condition", + [field_else_body] = "else_body", + [field_field] = "field", + [field_fields] = "fields", + [field_head] = "head", + [field_lhs] = "lhs", + [field_loop_body] = "loop_body", + [field_name] = "name", + [field_operation] = "operation", + [field_operator] = "operator", + [field_params] = "params", + [field_return_type] = "return_type", + [field_rhs] = "rhs", + [field_sym] = "sym", + [field_tail] = "tail", + [field_then_body] = "then_body", + [field_type] = "type", + [field_value] = "value", +}; + +static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [1] = {.index = 0, .length = 1}, + [4] = {.index = 1, .length = 2}, + [5] = {.index = 3, .length = 1}, + [6] = {.index = 4, .length = 2}, + [7] = {.index = 6, .length = 1}, + [8] = {.index = 7, .length = 3}, + [9] = {.index = 10, .length = 3}, + [10] = {.index = 13, .length = 2}, + [11] = {.index = 15, .length = 2}, + [12] = {.index = 17, .length = 3}, + [13] = {.index = 20, .length = 4}, + [14] = {.index = 24, .length = 2}, + [15] = {.index = 26, .length = 1}, + [16] = {.index = 27, .length = 2}, + [17] = {.index = 29, .length = 1}, + [18] = {.index = 30, .length = 3}, + [19] = {.index = 33, .length = 2}, + [20] = {.index = 35, .length = 3}, + [21] = {.index = 38, .length = 1}, + [22] = {.index = 39, .length = 2}, + [23] = {.index = 41, .length = 1}, + [24] = {.index = 42, .length = 3}, + [25] = {.index = 45, .length = 1}, + [26] = {.index = 46, .length = 2}, + [27] = {.index = 48, .length = 3}, + [28] = {.index = 51, .length = 1}, + [29] = {.index = 52, .length = 2}, + [30] = {.index = 54, .length = 1}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_name, 1}, + [1] = + {field_body, 4}, + {field_name, 1}, + [3] = + {field_tail, 0}, + [4] = + {field_fields, 3}, + {field_name, 1}, + [6] = + {field_callee, 0}, + [7] = + {field_body, 5}, + {field_name, 1}, + {field_return_type, 4}, + [10] = + {field_body, 5}, + {field_name, 1}, + {field_params, 3}, + [13] = + {field_operator, 0}, + {field_rhs, 1}, + [15] = + {field_arguments, 1, .inherited = true}, + {field_callee, 0}, + [17] = + {field_head, 0}, + {field_head, 1}, + {field_head, 2}, + [20] = + {field_body, 6}, + {field_name, 1}, + {field_params, 3}, + {field_return_type, 5}, + [24] = + {field_condition, 1}, + {field_then_body, 2}, + [26] = + {field_value, 1}, + [27] = + {field_lhs, 0}, + {field_rhs, 2}, + [29] = + {field_field, 1}, + [30] = + {field_lhs, 0}, + {field_operation, 1}, + {field_rhs, 2}, + [33] = + {field_arguments, 0, .inherited = true}, + {field_arguments, 1, .inherited = true}, + [35] = + {field_lhs, 0}, + {field_lhs, 1}, + {field_rhs, 3}, + [38] = + {field_arguments, 1}, + [39] = + {field_name, 1}, + {field_type, 3}, + [41] = + {field_loop_body, 4}, + [42] = + {field_condition, 1}, + {field_else_body, 4}, + {field_then_body, 2}, + [45] = + {field_sym, 0}, + [46] = + {field_sym, 0}, + {field_sym, 3, .inherited = true}, + [48] = + {field_name, 1}, + {field_type, 3}, + {field_value, 5}, + [51] = + {field_loop_body, 6}, + [52] = + {field_sym, 0, .inherited = true}, + {field_sym, 1, .inherited = true}, + [54] = + {field_sym, 1}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, + [2] = { + [0] = alias_sym_type_identifier, + }, + [3] = { + [0] = alias_sym_path_identifier, + }, + [17] = { + [1] = alias_sym_field_identifier, + }, +}; + +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] = 2, + [5] = 5, + [6] = 3, + [7] = 7, + [8] = 8, + [9] = 9, + [10] = 8, + [11] = 9, + [12] = 12, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 17, + [18] = 18, + [19] = 19, + [20] = 20, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 26, + [27] = 27, + [28] = 28, + [29] = 29, + [30] = 30, + [31] = 31, + [32] = 32, + [33] = 33, + [34] = 34, + [35] = 35, + [36] = 36, + [37] = 37, + [38] = 38, + [39] = 39, + [40] = 40, + [41] = 41, + [42] = 42, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 46, + [47] = 47, + [48] = 48, + [49] = 49, + [50] = 50, + [51] = 51, + [52] = 52, + [53] = 53, + [54] = 54, + [55] = 55, + [56] = 56, + [57] = 57, + [58] = 58, + [59] = 59, + [60] = 60, + [61] = 61, + [62] = 62, + [63] = 63, + [64] = 64, + [65] = 65, + [66] = 66, + [67] = 67, + [68] = 68, + [69] = 69, + [70] = 70, + [71] = 71, + [72] = 72, + [73] = 73, + [74] = 74, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 80, + [81] = 81, + [82] = 82, + [83] = 83, + [84] = 84, + [85] = 85, + [86] = 86, + [87] = 87, + [88] = 88, + [89] = 89, + [90] = 90, + [91] = 91, + [92] = 92, + [93] = 93, + [94] = 94, + [95] = 95, + [96] = 96, + [97] = 97, + [98] = 98, + [99] = 99, + [100] = 100, + [101] = 56, + [102] = 72, + [103] = 55, + [104] = 104, + [105] = 105, + [106] = 106, + [107] = 107, + [108] = 68, + [109] = 109, + [110] = 70, + [111] = 71, + [112] = 69, + [113] = 113, + [114] = 114, + [115] = 105, + [116] = 57, + [117] = 117, + [118] = 118, + [119] = 119, + [120] = 120, + [121] = 121, + [122] = 122, + [123] = 123, + [124] = 124, + [125] = 125, + [126] = 126, + [127] = 127, + [128] = 128, + [129] = 129, + [130] = 130, + [131] = 131, + [132] = 132, + [133] = 133, + [134] = 134, + [135] = 135, + [136] = 136, + [137] = 137, + [138] = 138, + [139] = 139, + [140] = 140, + [141] = 141, + [142] = 142, + [143] = 129, + [144] = 144, + [145] = 145, + [146] = 146, + [147] = 147, + [148] = 148, + [149] = 149, + [150] = 150, + [151] = 151, + [152] = 152, + [153] = 153, + [154] = 154, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 157, + [159] = 146, + [160] = 160, + [161] = 161, + [162] = 162, + [163] = 163, + [164] = 164, + [165] = 165, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 172, + [173] = 173, + [174] = 174, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 178, + [179] = 179, + [180] = 180, + [181] = 181, + [182] = 182, + [183] = 183, + [184] = 184, + [185] = 185, + [186] = 186, + [187] = 187, + [188] = 188, + [189] = 189, + [190] = 190, + [191] = 191, + [192] = 192, + [193] = 193, + [194] = 194, + [195] = 160, + [196] = 196, + [197] = 197, + [198] = 198, + [199] = 199, + [200] = 200, + [201] = 194, + [202] = 202, + [203] = 175, + [204] = 193, + [205] = 191, + [206] = 173, + [207] = 207, +}; + +static const TSSymbol ts_supertype_symbols[SUPERTYPE_COUNT] = { + sym_declaration, + sym_expression, + sym_expression_no_assign, + sym_non_binary_expression, + sym_stmt, + sym_top_decl, +}; + +static const TSMapSlice ts_supertype_map_slices[] = { + [sym_declaration] = {.index = 0, .length = 4}, + [sym_expression] = {.index = 4, .length = 3}, + [sym_expression_no_assign] = {.index = 7, .length = 2}, + [sym_non_binary_expression] = {.index = 9, .length = 2}, + [sym_stmt] = {.index = 11, .length = 7}, + [sym_top_decl] = {.index = 18, .length = 3}, +}; + +static const TSSymbol ts_supertype_map_entries[] = { + [0] = + sym_func_decl, + sym_struct_decl, + sym_sym_decl, + sym_var_decl, + [4] = + sym_assignment_expression, + sym_binary_expression, + sym_non_binary_expression, + [7] = + sym_binary_expression, + sym_non_binary_expression, + [9] = + sym_call_expression, + sym_unary_expression, + [11] = + sym_block, + sym_declaration, + sym_expr_stmt, + sym_for_stmt, + sym_if_stmt, + sym_return_stmt, + sym_while_stmt, + [18] = + sym_func_decl, + sym_imports_decls, + sym_struct_decl, +}; + +static const TSCharacterRange sym_IDENT_character_set_1[] = { + {'A', 'Z'}, {'_', '_'}, {'a', 'z'}, {0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6}, + {0xf8, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4}, {0x2ec, 0x2ec}, {0x2ee, 0x2ee}, {0x370, 0x374}, {0x376, 0x377}, {0x37b, 0x37d}, + {0x37f, 0x37f}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3f5}, {0x3f7, 0x481}, {0x48a, 0x52f}, + {0x531, 0x556}, {0x559, 0x559}, {0x560, 0x588}, {0x5d0, 0x5ea}, {0x5ef, 0x5f2}, {0x620, 0x64a}, {0x66e, 0x66f}, {0x671, 0x6d3}, + {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710}, {0x712, 0x72f}, {0x74d, 0x7a5}, + {0x7b1, 0x7b1}, {0x7ca, 0x7ea}, {0x7f4, 0x7f5}, {0x7fa, 0x7fa}, {0x800, 0x815}, {0x81a, 0x81a}, {0x824, 0x824}, {0x828, 0x828}, + {0x840, 0x858}, {0x860, 0x86a}, {0x870, 0x887}, {0x889, 0x88e}, {0x8a0, 0x8c9}, {0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950}, + {0x958, 0x961}, {0x971, 0x980}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, + {0x9bd, 0x9bd}, {0x9ce, 0x9ce}, {0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0x9fc, 0x9fc}, {0xa05, 0xa0a}, {0xa0f, 0xa10}, + {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74}, + {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd}, {0xad0, 0xad0}, + {0xae0, 0xae1}, {0xaf9, 0xaf9}, {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39}, + {0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71}, {0xb83, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, + {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb9}, {0xbd0, 0xbd0}, {0xc05, 0xc0c}, + {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc39}, {0xc3d, 0xc3d}, {0xc58, 0xc5a}, {0xc5d, 0xc5d}, {0xc60, 0xc61}, {0xc80, 0xc80}, + {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcdd, 0xcde}, {0xce0, 0xce1}, + {0xcf1, 0xcf2}, {0xd04, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd3d, 0xd3d}, {0xd4e, 0xd4e}, {0xd54, 0xd56}, {0xd5f, 0xd61}, + {0xd7a, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe32, 0xe32}, + {0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84}, {0xe86, 0xe8a}, {0xe8c, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xeb0}, {0xeb2, 0xeb2}, + {0xebd, 0xebd}, {0xec0, 0xec4}, {0xec6, 0xec6}, {0xedc, 0xedf}, {0xf00, 0xf00}, {0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c}, + {0x1000, 0x102a}, {0x103f, 0x103f}, {0x1050, 0x1055}, {0x105a, 0x105d}, {0x1061, 0x1061}, {0x1065, 0x1066}, {0x106e, 0x1070}, {0x1075, 0x1081}, + {0x108e, 0x108e}, {0x10a0, 0x10c5}, {0x10c7, 0x10c7}, {0x10cd, 0x10cd}, {0x10d0, 0x10fa}, {0x10fc, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256}, + {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, + {0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a}, {0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, + {0x1401, 0x166c}, {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x16ee, 0x16f8}, {0x1700, 0x1711}, {0x171f, 0x1731}, {0x1740, 0x1751}, + {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1878}, {0x1880, 0x18a8}, {0x18aa, 0x18aa}, + {0x18b0, 0x18f5}, {0x1900, 0x191e}, {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9}, {0x1a00, 0x1a16}, {0x1a20, 0x1a54}, + {0x1aa7, 0x1aa7}, {0x1b05, 0x1b33}, {0x1b45, 0x1b4c}, {0x1b83, 0x1ba0}, {0x1bae, 0x1baf}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23}, {0x1c4d, 0x1c4f}, + {0x1c5a, 0x1c7d}, {0x1c80, 0x1c8a}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf}, {0x1ce9, 0x1cec}, {0x1cee, 0x1cf3}, {0x1cf5, 0x1cf6}, {0x1cfa, 0x1cfa}, + {0x1d00, 0x1dbf}, {0x1e00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, + {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, + {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f}, {0x2090, 0x209c}, {0x2102, 0x2102}, + {0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115}, {0x2118, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x2139}, + {0x213c, 0x213f}, {0x2145, 0x2149}, {0x214e, 0x214e}, {0x2160, 0x2188}, {0x2c00, 0x2ce4}, {0x2ceb, 0x2cee}, {0x2cf2, 0x2cf3}, {0x2d00, 0x2d25}, + {0x2d27, 0x2d27}, {0x2d2d, 0x2d2d}, {0x2d30, 0x2d67}, {0x2d6f, 0x2d6f}, {0x2d80, 0x2d96}, {0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, + {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x3005, 0x3007}, {0x3021, 0x3029}, {0x3031, 0x3035}, + {0x3038, 0x303c}, {0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff}, {0x3105, 0x312f}, {0x3131, 0x318e}, {0x31a0, 0x31bf}, + {0x31f0, 0x31ff}, {0x3400, 0x4dbf}, {0x4e00, 0xa48c}, {0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa61f}, {0xa62a, 0xa62b}, {0xa640, 0xa66e}, + {0xa67f, 0xa69d}, {0xa6a0, 0xa6ef}, {0xa717, 0xa71f}, {0xa722, 0xa788}, {0xa78b, 0xa7cd}, {0xa7d0, 0xa7d1}, {0xa7d3, 0xa7d3}, {0xa7d5, 0xa7dc}, + {0xa7f2, 0xa801}, {0xa803, 0xa805}, {0xa807, 0xa80a}, {0xa80c, 0xa822}, {0xa840, 0xa873}, {0xa882, 0xa8b3}, {0xa8f2, 0xa8f7}, {0xa8fb, 0xa8fb}, + {0xa8fd, 0xa8fe}, {0xa90a, 0xa925}, {0xa930, 0xa946}, {0xa960, 0xa97c}, {0xa984, 0xa9b2}, {0xa9cf, 0xa9cf}, {0xa9e0, 0xa9e4}, {0xa9e6, 0xa9ef}, + {0xa9fa, 0xa9fe}, {0xaa00, 0xaa28}, {0xaa40, 0xaa42}, {0xaa44, 0xaa4b}, {0xaa60, 0xaa76}, {0xaa7a, 0xaa7a}, {0xaa7e, 0xaaaf}, {0xaab1, 0xaab1}, + {0xaab5, 0xaab6}, {0xaab9, 0xaabd}, {0xaac0, 0xaac0}, {0xaac2, 0xaac2}, {0xaadb, 0xaadd}, {0xaae0, 0xaaea}, {0xaaf2, 0xaaf4}, {0xab01, 0xab06}, + {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab69}, {0xab70, 0xabe2}, {0xac00, 0xd7a3}, + {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb28}, + {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfc5d}, {0xfc64, 0xfd3d}, + {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdf9}, {0xfe71, 0xfe71}, {0xfe73, 0xfe73}, {0xfe77, 0xfe77}, {0xfe79, 0xfe79}, {0xfe7b, 0xfe7b}, + {0xfe7d, 0xfe7d}, {0xfe7f, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xff9d}, {0xffa0, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, + {0xffd2, 0xffd7}, {0xffda, 0xffdc}, {0x10000, 0x1000b}, {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d}, {0x10050, 0x1005d}, + {0x10080, 0x100fa}, {0x10140, 0x10174}, {0x10280, 0x1029c}, {0x102a0, 0x102d0}, {0x10300, 0x1031f}, {0x1032d, 0x1034a}, {0x10350, 0x10375}, {0x10380, 0x1039d}, + {0x103a0, 0x103c3}, {0x103c8, 0x103cf}, {0x103d1, 0x103d5}, {0x10400, 0x1049d}, {0x104b0, 0x104d3}, {0x104d8, 0x104fb}, {0x10500, 0x10527}, {0x10530, 0x10563}, + {0x10570, 0x1057a}, {0x1057c, 0x1058a}, {0x1058c, 0x10592}, {0x10594, 0x10595}, {0x10597, 0x105a1}, {0x105a3, 0x105b1}, {0x105b3, 0x105b9}, {0x105bb, 0x105bc}, + {0x105c0, 0x105f3}, {0x10600, 0x10736}, {0x10740, 0x10755}, {0x10760, 0x10767}, {0x10780, 0x10785}, {0x10787, 0x107b0}, {0x107b2, 0x107ba}, {0x10800, 0x10805}, + {0x10808, 0x10808}, {0x1080a, 0x10835}, {0x10837, 0x10838}, {0x1083c, 0x1083c}, {0x1083f, 0x10855}, {0x10860, 0x10876}, {0x10880, 0x1089e}, {0x108e0, 0x108f2}, + {0x108f4, 0x108f5}, {0x10900, 0x10915}, {0x10920, 0x10939}, {0x10980, 0x109b7}, {0x109be, 0x109bf}, {0x10a00, 0x10a00}, {0x10a10, 0x10a13}, {0x10a15, 0x10a17}, + {0x10a19, 0x10a35}, {0x10a60, 0x10a7c}, {0x10a80, 0x10a9c}, {0x10ac0, 0x10ac7}, {0x10ac9, 0x10ae4}, {0x10b00, 0x10b35}, {0x10b40, 0x10b55}, {0x10b60, 0x10b72}, + {0x10b80, 0x10b91}, {0x10c00, 0x10c48}, {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10d00, 0x10d23}, {0x10d4a, 0x10d65}, {0x10d6f, 0x10d85}, {0x10e80, 0x10ea9}, + {0x10eb0, 0x10eb1}, {0x10ec2, 0x10ec4}, {0x10f00, 0x10f1c}, {0x10f27, 0x10f27}, {0x10f30, 0x10f45}, {0x10f70, 0x10f81}, {0x10fb0, 0x10fc4}, {0x10fe0, 0x10ff6}, + {0x11003, 0x11037}, {0x11071, 0x11072}, {0x11075, 0x11075}, {0x11083, 0x110af}, {0x110d0, 0x110e8}, {0x11103, 0x11126}, {0x11144, 0x11144}, {0x11147, 0x11147}, + {0x11150, 0x11172}, {0x11176, 0x11176}, {0x11183, 0x111b2}, {0x111c1, 0x111c4}, {0x111da, 0x111da}, {0x111dc, 0x111dc}, {0x11200, 0x11211}, {0x11213, 0x1122b}, + {0x1123f, 0x11240}, {0x11280, 0x11286}, {0x11288, 0x11288}, {0x1128a, 0x1128d}, {0x1128f, 0x1129d}, {0x1129f, 0x112a8}, {0x112b0, 0x112de}, {0x11305, 0x1130c}, + {0x1130f, 0x11310}, {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11332, 0x11333}, {0x11335, 0x11339}, {0x1133d, 0x1133d}, {0x11350, 0x11350}, {0x1135d, 0x11361}, + {0x11380, 0x11389}, {0x1138b, 0x1138b}, {0x1138e, 0x1138e}, {0x11390, 0x113b5}, {0x113b7, 0x113b7}, {0x113d1, 0x113d1}, {0x113d3, 0x113d3}, {0x11400, 0x11434}, + {0x11447, 0x1144a}, {0x1145f, 0x11461}, {0x11480, 0x114af}, {0x114c4, 0x114c5}, {0x114c7, 0x114c7}, {0x11580, 0x115ae}, {0x115d8, 0x115db}, {0x11600, 0x1162f}, + {0x11644, 0x11644}, {0x11680, 0x116aa}, {0x116b8, 0x116b8}, {0x11700, 0x1171a}, {0x11740, 0x11746}, {0x11800, 0x1182b}, {0x118a0, 0x118df}, {0x118ff, 0x11906}, + {0x11909, 0x11909}, {0x1190c, 0x11913}, {0x11915, 0x11916}, {0x11918, 0x1192f}, {0x1193f, 0x1193f}, {0x11941, 0x11941}, {0x119a0, 0x119a7}, {0x119aa, 0x119d0}, + {0x119e1, 0x119e1}, {0x119e3, 0x119e3}, {0x11a00, 0x11a00}, {0x11a0b, 0x11a32}, {0x11a3a, 0x11a3a}, {0x11a50, 0x11a50}, {0x11a5c, 0x11a89}, {0x11a9d, 0x11a9d}, + {0x11ab0, 0x11af8}, {0x11bc0, 0x11be0}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c2e}, {0x11c40, 0x11c40}, {0x11c72, 0x11c8f}, {0x11d00, 0x11d06}, {0x11d08, 0x11d09}, + {0x11d0b, 0x11d30}, {0x11d46, 0x11d46}, {0x11d60, 0x11d65}, {0x11d67, 0x11d68}, {0x11d6a, 0x11d89}, {0x11d98, 0x11d98}, {0x11ee0, 0x11ef2}, {0x11f02, 0x11f02}, + {0x11f04, 0x11f10}, {0x11f12, 0x11f33}, {0x11fb0, 0x11fb0}, {0x12000, 0x12399}, {0x12400, 0x1246e}, {0x12480, 0x12543}, {0x12f90, 0x12ff0}, {0x13000, 0x1342f}, + {0x13441, 0x13446}, {0x13460, 0x143fa}, {0x14400, 0x14646}, {0x16100, 0x1611d}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e}, {0x16a70, 0x16abe}, {0x16ad0, 0x16aed}, + {0x16b00, 0x16b2f}, {0x16b40, 0x16b43}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f}, {0x16d40, 0x16d6c}, {0x16e40, 0x16e7f}, {0x16f00, 0x16f4a}, {0x16f50, 0x16f50}, + {0x16f93, 0x16f9f}, {0x16fe0, 0x16fe1}, {0x16fe3, 0x16fe3}, {0x17000, 0x187f7}, {0x18800, 0x18cd5}, {0x18cff, 0x18d08}, {0x1aff0, 0x1aff3}, {0x1aff5, 0x1affb}, + {0x1affd, 0x1affe}, {0x1b000, 0x1b122}, {0x1b132, 0x1b132}, {0x1b150, 0x1b152}, {0x1b155, 0x1b155}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb}, {0x1bc00, 0x1bc6a}, + {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99}, {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, + {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, + {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da}, + {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734}, {0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2}, + {0x1d7c4, 0x1d7cb}, {0x1df00, 0x1df1e}, {0x1df25, 0x1df2a}, {0x1e030, 0x1e06d}, {0x1e100, 0x1e12c}, {0x1e137, 0x1e13d}, {0x1e14e, 0x1e14e}, {0x1e290, 0x1e2ad}, + {0x1e2c0, 0x1e2eb}, {0x1e4d0, 0x1e4eb}, {0x1e5d0, 0x1e5ed}, {0x1e5f0, 0x1e5f0}, {0x1e7e0, 0x1e7e6}, {0x1e7e8, 0x1e7eb}, {0x1e7ed, 0x1e7ee}, {0x1e7f0, 0x1e7fe}, + {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, {0x1e94b, 0x1e94b}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee21, 0x1ee22}, {0x1ee24, 0x1ee24}, {0x1ee27, 0x1ee27}, + {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee39, 0x1ee39}, {0x1ee3b, 0x1ee3b}, {0x1ee42, 0x1ee42}, {0x1ee47, 0x1ee47}, {0x1ee49, 0x1ee49}, {0x1ee4b, 0x1ee4b}, + {0x1ee4d, 0x1ee4f}, {0x1ee51, 0x1ee52}, {0x1ee54, 0x1ee54}, {0x1ee57, 0x1ee57}, {0x1ee59, 0x1ee59}, {0x1ee5b, 0x1ee5b}, {0x1ee5d, 0x1ee5d}, {0x1ee5f, 0x1ee5f}, + {0x1ee61, 0x1ee62}, {0x1ee64, 0x1ee64}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee7e, 0x1ee7e}, {0x1ee80, 0x1ee89}, + {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x20000, 0x2a6df}, {0x2a700, 0x2b739}, {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, + {0x2ceb0, 0x2ebe0}, {0x2ebf0, 0x2ee5d}, {0x2f800, 0x2fa1d}, {0x30000, 0x3134a}, {0x31350, 0x323af}, +}; + +static const TSCharacterRange sym_IDENT_character_set_2[] = { + {'0', '9'}, {'A', 'Z'}, {'_', '_'}, {'a', 'z'}, {0xaa, 0xaa}, {0xb5, 0xb5}, {0xb7, 0xb7}, {0xba, 0xba}, + {0xc0, 0xd6}, {0xd8, 0xf6}, {0xf8, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4}, {0x2ec, 0x2ec}, {0x2ee, 0x2ee}, {0x300, 0x374}, + {0x376, 0x377}, {0x37b, 0x37d}, {0x37f, 0x37f}, {0x386, 0x38a}, {0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3f5}, {0x3f7, 0x481}, + {0x483, 0x487}, {0x48a, 0x52f}, {0x531, 0x556}, {0x559, 0x559}, {0x560, 0x588}, {0x591, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, + {0x5c4, 0x5c5}, {0x5c7, 0x5c7}, {0x5d0, 0x5ea}, {0x5ef, 0x5f2}, {0x610, 0x61a}, {0x620, 0x669}, {0x66e, 0x6d3}, {0x6d5, 0x6dc}, + {0x6df, 0x6e8}, {0x6ea, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x74a}, {0x74d, 0x7b1}, {0x7c0, 0x7f5}, {0x7fa, 0x7fa}, {0x7fd, 0x7fd}, + {0x800, 0x82d}, {0x840, 0x85b}, {0x860, 0x86a}, {0x870, 0x887}, {0x889, 0x88e}, {0x897, 0x8e1}, {0x8e3, 0x963}, {0x966, 0x96f}, + {0x971, 0x983}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bc, 0x9c4}, + {0x9c7, 0x9c8}, {0x9cb, 0x9ce}, {0x9d7, 0x9d7}, {0x9dc, 0x9dd}, {0x9df, 0x9e3}, {0x9e6, 0x9f1}, {0x9fc, 0x9fc}, {0x9fe, 0x9fe}, + {0xa01, 0xa03}, {0xa05, 0xa0a}, {0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36}, {0xa38, 0xa39}, + {0xa3c, 0xa3c}, {0xa3e, 0xa42}, {0xa47, 0xa48}, {0xa4b, 0xa4d}, {0xa51, 0xa51}, {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa66, 0xa75}, + {0xa81, 0xa83}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabc, 0xac5}, + {0xac7, 0xac9}, {0xacb, 0xacd}, {0xad0, 0xad0}, {0xae0, 0xae3}, {0xae6, 0xaef}, {0xaf9, 0xaff}, {0xb01, 0xb03}, {0xb05, 0xb0c}, + {0xb0f, 0xb10}, {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39}, {0xb3c, 0xb44}, {0xb47, 0xb48}, {0xb4b, 0xb4d}, + {0xb55, 0xb57}, {0xb5c, 0xb5d}, {0xb5f, 0xb63}, {0xb66, 0xb6f}, {0xb71, 0xb71}, {0xb82, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, + {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb9}, {0xbbe, 0xbc2}, + {0xbc6, 0xbc8}, {0xbca, 0xbcd}, {0xbd0, 0xbd0}, {0xbd7, 0xbd7}, {0xbe6, 0xbef}, {0xc00, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, + {0xc2a, 0xc39}, {0xc3c, 0xc44}, {0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc58, 0xc5a}, {0xc5d, 0xc5d}, {0xc60, 0xc63}, + {0xc66, 0xc6f}, {0xc80, 0xc83}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbc, 0xcc4}, + {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6}, {0xcdd, 0xcde}, {0xce0, 0xce3}, {0xce6, 0xcef}, {0xcf1, 0xcf3}, {0xd00, 0xd0c}, + {0xd0e, 0xd10}, {0xd12, 0xd44}, {0xd46, 0xd48}, {0xd4a, 0xd4e}, {0xd54, 0xd57}, {0xd5f, 0xd63}, {0xd66, 0xd6f}, {0xd7a, 0xd7f}, + {0xd81, 0xd83}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xdca, 0xdca}, {0xdcf, 0xdd4}, + {0xdd6, 0xdd6}, {0xdd8, 0xddf}, {0xde6, 0xdef}, {0xdf2, 0xdf3}, {0xe01, 0xe3a}, {0xe40, 0xe4e}, {0xe50, 0xe59}, {0xe81, 0xe82}, + {0xe84, 0xe84}, {0xe86, 0xe8a}, {0xe8c, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xebd}, {0xec0, 0xec4}, {0xec6, 0xec6}, {0xec8, 0xece}, + {0xed0, 0xed9}, {0xedc, 0xedf}, {0xf00, 0xf00}, {0xf18, 0xf19}, {0xf20, 0xf29}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39}, + {0xf3e, 0xf47}, {0xf49, 0xf6c}, {0xf71, 0xf84}, {0xf86, 0xf97}, {0xf99, 0xfbc}, {0xfc6, 0xfc6}, {0x1000, 0x1049}, {0x1050, 0x109d}, + {0x10a0, 0x10c5}, {0x10c7, 0x10c7}, {0x10cd, 0x10cd}, {0x10d0, 0x10fa}, {0x10fc, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256}, {0x1258, 0x1258}, + {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5}, + {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a}, {0x135d, 0x135f}, {0x1369, 0x1371}, {0x1380, 0x138f}, {0x13a0, 0x13f5}, + {0x13f8, 0x13fd}, {0x1401, 0x166c}, {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x16ee, 0x16f8}, {0x1700, 0x1715}, {0x171f, 0x1734}, + {0x1740, 0x1753}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1772, 0x1773}, {0x1780, 0x17d3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dd}, {0x17e0, 0x17e9}, + {0x180b, 0x180d}, {0x180f, 0x1819}, {0x1820, 0x1878}, {0x1880, 0x18aa}, {0x18b0, 0x18f5}, {0x1900, 0x191e}, {0x1920, 0x192b}, {0x1930, 0x193b}, + {0x1946, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9}, {0x19d0, 0x19da}, {0x1a00, 0x1a1b}, {0x1a20, 0x1a5e}, {0x1a60, 0x1a7c}, + {0x1a7f, 0x1a89}, {0x1a90, 0x1a99}, {0x1aa7, 0x1aa7}, {0x1ab0, 0x1abd}, {0x1abf, 0x1ace}, {0x1b00, 0x1b4c}, {0x1b50, 0x1b59}, {0x1b6b, 0x1b73}, + {0x1b80, 0x1bf3}, {0x1c00, 0x1c37}, {0x1c40, 0x1c49}, {0x1c4d, 0x1c7d}, {0x1c80, 0x1c8a}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf}, {0x1cd0, 0x1cd2}, + {0x1cd4, 0x1cfa}, {0x1d00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, + {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, + {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x200c, 0x200d}, {0x203f, 0x2040}, {0x2054, 0x2054}, {0x2071, 0x2071}, + {0x207f, 0x207f}, {0x2090, 0x209c}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x20e5, 0x20f0}, {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, + {0x2115, 0x2115}, {0x2118, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x2139}, {0x213c, 0x213f}, {0x2145, 0x2149}, + {0x214e, 0x214e}, {0x2160, 0x2188}, {0x2c00, 0x2ce4}, {0x2ceb, 0x2cf3}, {0x2d00, 0x2d25}, {0x2d27, 0x2d27}, {0x2d2d, 0x2d2d}, {0x2d30, 0x2d67}, + {0x2d6f, 0x2d6f}, {0x2d7f, 0x2d96}, {0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, + {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2dff}, {0x3005, 0x3007}, {0x3021, 0x302f}, {0x3031, 0x3035}, {0x3038, 0x303c}, {0x3041, 0x3096}, + {0x3099, 0x309a}, {0x309d, 0x309f}, {0x30a1, 0x30ff}, {0x3105, 0x312f}, {0x3131, 0x318e}, {0x31a0, 0x31bf}, {0x31f0, 0x31ff}, {0x3400, 0x4dbf}, + {0x4e00, 0xa48c}, {0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa62b}, {0xa640, 0xa66f}, {0xa674, 0xa67d}, {0xa67f, 0xa6f1}, {0xa717, 0xa71f}, + {0xa722, 0xa788}, {0xa78b, 0xa7cd}, {0xa7d0, 0xa7d1}, {0xa7d3, 0xa7d3}, {0xa7d5, 0xa7dc}, {0xa7f2, 0xa827}, {0xa82c, 0xa82c}, {0xa840, 0xa873}, + {0xa880, 0xa8c5}, {0xa8d0, 0xa8d9}, {0xa8e0, 0xa8f7}, {0xa8fb, 0xa8fb}, {0xa8fd, 0xa92d}, {0xa930, 0xa953}, {0xa960, 0xa97c}, {0xa980, 0xa9c0}, + {0xa9cf, 0xa9d9}, {0xa9e0, 0xa9fe}, {0xaa00, 0xaa36}, {0xaa40, 0xaa4d}, {0xaa50, 0xaa59}, {0xaa60, 0xaa76}, {0xaa7a, 0xaac2}, {0xaadb, 0xaadd}, + {0xaae0, 0xaaef}, {0xaaf2, 0xaaf6}, {0xab01, 0xab06}, {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, + {0xab5c, 0xab69}, {0xab70, 0xabea}, {0xabec, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, + {0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41}, + {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfc5d}, {0xfc64, 0xfd3d}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdf9}, {0xfe00, 0xfe0f}, + {0xfe20, 0xfe2f}, {0xfe33, 0xfe34}, {0xfe4d, 0xfe4f}, {0xfe71, 0xfe71}, {0xfe73, 0xfe73}, {0xfe77, 0xfe77}, {0xfe79, 0xfe79}, {0xfe7b, 0xfe7b}, + {0xfe7d, 0xfe7d}, {0xfe7f, 0xfefc}, {0xff10, 0xff19}, {0xff21, 0xff3a}, {0xff3f, 0xff3f}, {0xff41, 0xff5a}, {0xff65, 0xffbe}, {0xffc2, 0xffc7}, + {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc}, {0x10000, 0x1000b}, {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d}, + {0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10140, 0x10174}, {0x101fd, 0x101fd}, {0x10280, 0x1029c}, {0x102a0, 0x102d0}, {0x102e0, 0x102e0}, {0x10300, 0x1031f}, + {0x1032d, 0x1034a}, {0x10350, 0x1037a}, {0x10380, 0x1039d}, {0x103a0, 0x103c3}, {0x103c8, 0x103cf}, {0x103d1, 0x103d5}, {0x10400, 0x1049d}, {0x104a0, 0x104a9}, + {0x104b0, 0x104d3}, {0x104d8, 0x104fb}, {0x10500, 0x10527}, {0x10530, 0x10563}, {0x10570, 0x1057a}, {0x1057c, 0x1058a}, {0x1058c, 0x10592}, {0x10594, 0x10595}, + {0x10597, 0x105a1}, {0x105a3, 0x105b1}, {0x105b3, 0x105b9}, {0x105bb, 0x105bc}, {0x105c0, 0x105f3}, {0x10600, 0x10736}, {0x10740, 0x10755}, {0x10760, 0x10767}, + {0x10780, 0x10785}, {0x10787, 0x107b0}, {0x107b2, 0x107ba}, {0x10800, 0x10805}, {0x10808, 0x10808}, {0x1080a, 0x10835}, {0x10837, 0x10838}, {0x1083c, 0x1083c}, + {0x1083f, 0x10855}, {0x10860, 0x10876}, {0x10880, 0x1089e}, {0x108e0, 0x108f2}, {0x108f4, 0x108f5}, {0x10900, 0x10915}, {0x10920, 0x10939}, {0x10980, 0x109b7}, + {0x109be, 0x109bf}, {0x10a00, 0x10a03}, {0x10a05, 0x10a06}, {0x10a0c, 0x10a13}, {0x10a15, 0x10a17}, {0x10a19, 0x10a35}, {0x10a38, 0x10a3a}, {0x10a3f, 0x10a3f}, + {0x10a60, 0x10a7c}, {0x10a80, 0x10a9c}, {0x10ac0, 0x10ac7}, {0x10ac9, 0x10ae6}, {0x10b00, 0x10b35}, {0x10b40, 0x10b55}, {0x10b60, 0x10b72}, {0x10b80, 0x10b91}, + {0x10c00, 0x10c48}, {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10d00, 0x10d27}, {0x10d30, 0x10d39}, {0x10d40, 0x10d65}, {0x10d69, 0x10d6d}, {0x10d6f, 0x10d85}, + {0x10e80, 0x10ea9}, {0x10eab, 0x10eac}, {0x10eb0, 0x10eb1}, {0x10ec2, 0x10ec4}, {0x10efc, 0x10f1c}, {0x10f27, 0x10f27}, {0x10f30, 0x10f50}, {0x10f70, 0x10f85}, + {0x10fb0, 0x10fc4}, {0x10fe0, 0x10ff6}, {0x11000, 0x11046}, {0x11066, 0x11075}, {0x1107f, 0x110ba}, {0x110c2, 0x110c2}, {0x110d0, 0x110e8}, {0x110f0, 0x110f9}, + {0x11100, 0x11134}, {0x11136, 0x1113f}, {0x11144, 0x11147}, {0x11150, 0x11173}, {0x11176, 0x11176}, {0x11180, 0x111c4}, {0x111c9, 0x111cc}, {0x111ce, 0x111da}, + {0x111dc, 0x111dc}, {0x11200, 0x11211}, {0x11213, 0x11237}, {0x1123e, 0x11241}, {0x11280, 0x11286}, {0x11288, 0x11288}, {0x1128a, 0x1128d}, {0x1128f, 0x1129d}, + {0x1129f, 0x112a8}, {0x112b0, 0x112ea}, {0x112f0, 0x112f9}, {0x11300, 0x11303}, {0x11305, 0x1130c}, {0x1130f, 0x11310}, {0x11313, 0x11328}, {0x1132a, 0x11330}, + {0x11332, 0x11333}, {0x11335, 0x11339}, {0x1133b, 0x11344}, {0x11347, 0x11348}, {0x1134b, 0x1134d}, {0x11350, 0x11350}, {0x11357, 0x11357}, {0x1135d, 0x11363}, + {0x11366, 0x1136c}, {0x11370, 0x11374}, {0x11380, 0x11389}, {0x1138b, 0x1138b}, {0x1138e, 0x1138e}, {0x11390, 0x113b5}, {0x113b7, 0x113c0}, {0x113c2, 0x113c2}, + {0x113c5, 0x113c5}, {0x113c7, 0x113ca}, {0x113cc, 0x113d3}, {0x113e1, 0x113e2}, {0x11400, 0x1144a}, {0x11450, 0x11459}, {0x1145e, 0x11461}, {0x11480, 0x114c5}, + {0x114c7, 0x114c7}, {0x114d0, 0x114d9}, {0x11580, 0x115b5}, {0x115b8, 0x115c0}, {0x115d8, 0x115dd}, {0x11600, 0x11640}, {0x11644, 0x11644}, {0x11650, 0x11659}, + {0x11680, 0x116b8}, {0x116c0, 0x116c9}, {0x116d0, 0x116e3}, {0x11700, 0x1171a}, {0x1171d, 0x1172b}, {0x11730, 0x11739}, {0x11740, 0x11746}, {0x11800, 0x1183a}, + {0x118a0, 0x118e9}, {0x118ff, 0x11906}, {0x11909, 0x11909}, {0x1190c, 0x11913}, {0x11915, 0x11916}, {0x11918, 0x11935}, {0x11937, 0x11938}, {0x1193b, 0x11943}, + {0x11950, 0x11959}, {0x119a0, 0x119a7}, {0x119aa, 0x119d7}, {0x119da, 0x119e1}, {0x119e3, 0x119e4}, {0x11a00, 0x11a3e}, {0x11a47, 0x11a47}, {0x11a50, 0x11a99}, + {0x11a9d, 0x11a9d}, {0x11ab0, 0x11af8}, {0x11bc0, 0x11be0}, {0x11bf0, 0x11bf9}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c36}, {0x11c38, 0x11c40}, {0x11c50, 0x11c59}, + {0x11c72, 0x11c8f}, {0x11c92, 0x11ca7}, {0x11ca9, 0x11cb6}, {0x11d00, 0x11d06}, {0x11d08, 0x11d09}, {0x11d0b, 0x11d36}, {0x11d3a, 0x11d3a}, {0x11d3c, 0x11d3d}, + {0x11d3f, 0x11d47}, {0x11d50, 0x11d59}, {0x11d60, 0x11d65}, {0x11d67, 0x11d68}, {0x11d6a, 0x11d8e}, {0x11d90, 0x11d91}, {0x11d93, 0x11d98}, {0x11da0, 0x11da9}, + {0x11ee0, 0x11ef6}, {0x11f00, 0x11f10}, {0x11f12, 0x11f3a}, {0x11f3e, 0x11f42}, {0x11f50, 0x11f5a}, {0x11fb0, 0x11fb0}, {0x12000, 0x12399}, {0x12400, 0x1246e}, + {0x12480, 0x12543}, {0x12f90, 0x12ff0}, {0x13000, 0x1342f}, {0x13440, 0x13455}, {0x13460, 0x143fa}, {0x14400, 0x14646}, {0x16100, 0x16139}, {0x16800, 0x16a38}, + {0x16a40, 0x16a5e}, {0x16a60, 0x16a69}, {0x16a70, 0x16abe}, {0x16ac0, 0x16ac9}, {0x16ad0, 0x16aed}, {0x16af0, 0x16af4}, {0x16b00, 0x16b36}, {0x16b40, 0x16b43}, + {0x16b50, 0x16b59}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f}, {0x16d40, 0x16d6c}, {0x16d70, 0x16d79}, {0x16e40, 0x16e7f}, {0x16f00, 0x16f4a}, {0x16f4f, 0x16f87}, + {0x16f8f, 0x16f9f}, {0x16fe0, 0x16fe1}, {0x16fe3, 0x16fe4}, {0x16ff0, 0x16ff1}, {0x17000, 0x187f7}, {0x18800, 0x18cd5}, {0x18cff, 0x18d08}, {0x1aff0, 0x1aff3}, + {0x1aff5, 0x1affb}, {0x1affd, 0x1affe}, {0x1b000, 0x1b122}, {0x1b132, 0x1b132}, {0x1b150, 0x1b152}, {0x1b155, 0x1b155}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb}, + {0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99}, {0x1bc9d, 0x1bc9e}, {0x1ccf0, 0x1ccf9}, {0x1cf00, 0x1cf2d}, {0x1cf30, 0x1cf46}, + {0x1d165, 0x1d169}, {0x1d16d, 0x1d172}, {0x1d17b, 0x1d182}, {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, {0x1d242, 0x1d244}, {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, + {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, + {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550}, + {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da}, {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734}, {0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, + {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7cb}, {0x1d7ce, 0x1d7ff}, {0x1da00, 0x1da36}, {0x1da3b, 0x1da6c}, {0x1da75, 0x1da75}, + {0x1da84, 0x1da84}, {0x1da9b, 0x1da9f}, {0x1daa1, 0x1daaf}, {0x1df00, 0x1df1e}, {0x1df25, 0x1df2a}, {0x1e000, 0x1e006}, {0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, + {0x1e023, 0x1e024}, {0x1e026, 0x1e02a}, {0x1e030, 0x1e06d}, {0x1e08f, 0x1e08f}, {0x1e100, 0x1e12c}, {0x1e130, 0x1e13d}, {0x1e140, 0x1e149}, {0x1e14e, 0x1e14e}, + {0x1e290, 0x1e2ae}, {0x1e2c0, 0x1e2f9}, {0x1e4d0, 0x1e4f9}, {0x1e5d0, 0x1e5fa}, {0x1e7e0, 0x1e7e6}, {0x1e7e8, 0x1e7eb}, {0x1e7ed, 0x1e7ee}, {0x1e7f0, 0x1e7fe}, + {0x1e800, 0x1e8c4}, {0x1e8d0, 0x1e8d6}, {0x1e900, 0x1e94b}, {0x1e950, 0x1e959}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee21, 0x1ee22}, {0x1ee24, 0x1ee24}, + {0x1ee27, 0x1ee27}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee39, 0x1ee39}, {0x1ee3b, 0x1ee3b}, {0x1ee42, 0x1ee42}, {0x1ee47, 0x1ee47}, {0x1ee49, 0x1ee49}, + {0x1ee4b, 0x1ee4b}, {0x1ee4d, 0x1ee4f}, {0x1ee51, 0x1ee52}, {0x1ee54, 0x1ee54}, {0x1ee57, 0x1ee57}, {0x1ee59, 0x1ee59}, {0x1ee5b, 0x1ee5b}, {0x1ee5d, 0x1ee5d}, + {0x1ee5f, 0x1ee5f}, {0x1ee61, 0x1ee62}, {0x1ee64, 0x1ee64}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee7e, 0x1ee7e}, + {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x1fbf0, 0x1fbf9}, {0x20000, 0x2a6df}, {0x2a700, 0x2b739}, + {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2ebf0, 0x2ee5d}, {0x2f800, 0x2fa1d}, {0x30000, 0x3134a}, {0x31350, 0x323af}, {0xe0100, 0xe01ef}, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(19); + ADVANCE_MAP( + '!', 43, + '"', 9, + '(', 21, + ')', 22, + '*', 40, + '+', 38, + ',', 46, + '-', 39, + '.', 48, + '/', 41, + '0', 50, + ':', 26, + ';', 20, + '<', 33, + '=', 28, + '>', 35, + '[', 44, + ); + if (lookahead == '\\') SKIP(18); + if (lookahead == ']') ADVANCE(45); + if (lookahead == '{') ADVANCE(23); + if (lookahead == '}') ADVANCE(24); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(51); + if (set_contains(sym_IDENT_character_set_1, 685, lookahead)) ADVANCE(49); + END_STATE(); + case 1: + if (lookahead == '\n') SKIP(7); + END_STATE(); + case 2: + if (lookahead == '\n') SKIP(7); + if (lookahead == '\r') SKIP(1); + END_STATE(); + case 3: + if (lookahead == '\n') SKIP(8); + END_STATE(); + case 4: + if (lookahead == '\n') SKIP(8); + if (lookahead == '\r') SKIP(3); + END_STATE(); + case 5: + if (lookahead == '\n') SKIP(13); + END_STATE(); + case 6: + if (lookahead == '\n') SKIP(13); + if (lookahead == '\r') SKIP(5); + END_STATE(); + case 7: + ADVANCE_MAP( + '!', 42, + '"', 9, + '(', 21, + ')', 22, + ',', 46, + '-', 39, + '/', 10, + '0', 50, + ':', 14, + ';', 20, + '<', 32, + '=', 27, + '>', 34, + ); + if (lookahead == '\\') SKIP(2); + if (lookahead == '{') ADVANCE(23); + if (lookahead == '}') ADVANCE(24); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(7); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(51); + if (set_contains(sym_IDENT_character_set_1, 685, lookahead)) ADVANCE(49); + END_STATE(); + case 8: + ADVANCE_MAP( + '!', 15, + '(', 21, + ')', 22, + '*', 40, + '+', 38, + ',', 46, + '-', 39, + '.', 48, + '/', 41, + ':', 14, + ';', 20, + '<', 33, + '=', 28, + '>', 35, + '[', 44, + ); + if (lookahead == '\\') SKIP(4); + if (lookahead == ']') ADVANCE(45); + if (lookahead == '{') ADVANCE(23); + if (lookahead == '}') ADVANCE(24); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(8); + if (set_contains(sym_IDENT_character_set_1, 685, lookahead)) ADVANCE(49); + END_STATE(); + case 9: + if (lookahead == '"') ADVANCE(53); + if (lookahead != 0) ADVANCE(9); + END_STATE(); + case 10: + if (lookahead == '*') ADVANCE(12); + if (lookahead == '/') ADVANCE(55); + END_STATE(); + case 11: + if (lookahead == '*') ADVANCE(11); + if (lookahead == '/') ADVANCE(54); + if (lookahead != 0) ADVANCE(12); + END_STATE(); + case 12: + if (lookahead == '*') ADVANCE(11); + if (lookahead != 0) ADVANCE(12); + END_STATE(); + case 13: + if (lookahead == '/') ADVANCE(10); + if (lookahead == ':') ADVANCE(25); + if (lookahead == '\\') SKIP(6); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(13); + END_STATE(); + case 14: + if (lookahead == ':') ADVANCE(47); + END_STATE(); + case 15: + if (lookahead == '=') ADVANCE(31); + END_STATE(); + case 16: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + END_STATE(); + case 17: + if (eof) ADVANCE(19); + if (lookahead == '\n') SKIP(0); + END_STATE(); + case 18: + if (eof) ADVANCE(19); + if (lookahead == '\n') SKIP(0); + if (lookahead == '\r') SKIP(17); + END_STATE(); + case 19: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 20: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 21: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 22: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 23: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 24: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 25: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == ':') ADVANCE(47); + END_STATE(); + case 27: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 28: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(30); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_DOT_DOT); + END_STATE(); + case 30: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 32: + ACCEPT_TOKEN(anon_sym_LT); + END_STATE(); + case 33: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '=') ADVANCE(36); + END_STATE(); + case 34: + ACCEPT_TOKEN(anon_sym_GT); + END_STATE(); + case 35: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(37); + END_STATE(); + case 36: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 38: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 39: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 40: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 41: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '*') ADVANCE(12); + if (lookahead == '/') ADVANCE(55); + END_STATE(); + case 42: + ACCEPT_TOKEN(anon_sym_BANG); + END_STATE(); + case 43: + ACCEPT_TOKEN(anon_sym_BANG); + if (lookahead == '=') ADVANCE(31); + END_STATE(); + case 44: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 45: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 46: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 47: + ACCEPT_TOKEN(anon_sym_COLON_COLON); + END_STATE(); + case 48: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(29); + END_STATE(); + case 49: + ACCEPT_TOKEN(sym_IDENT); + if (set_contains(sym_IDENT_character_set_2, 800, lookahead)) ADVANCE(49); + END_STATE(); + case 50: + ACCEPT_TOKEN(sym_NUM); + END_STATE(); + case 51: + ACCEPT_TOKEN(sym_NUM); + if (lookahead == '.') ADVANCE(16); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(51); + END_STATE(); + case 52: + ACCEPT_TOKEN(sym_NUM); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + END_STATE(); + case 53: + ACCEPT_TOKEN(sym_STRING); + END_STATE(); + case 54: + ACCEPT_TOKEN(sym_comment); + END_STATE(); + case 55: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(55); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (lookahead == '\\') SKIP(1); + if (lookahead == 'a') ADVANCE(2); + if (lookahead == 'b') ADVANCE(3); + if (lookahead == 'c') ADVANCE(4); + if (lookahead == 'd') ADVANCE(5); + if (lookahead == 'e') ADVANCE(6); + if (lookahead == 'f') ADVANCE(7); + if (lookahead == 'i') ADVANCE(8); + if (lookahead == 'l') ADVANCE(9); + if (lookahead == 'o') ADVANCE(10); + if (lookahead == 'p') ADVANCE(11); + if (lookahead == 'r') ADVANCE(12); + if (lookahead == 's') ADVANCE(13); + if (lookahead == 't') ADVANCE(14); + if (lookahead == 'u') ADVANCE(15); + if (lookahead == 'w') ADVANCE(16); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + END_STATE(); + case 1: + if (lookahead == '\n') SKIP(0); + if (lookahead == '\r') SKIP(17); + END_STATE(); + case 2: + if (lookahead == 'n') ADVANCE(18); + END_STATE(); + case 3: + if (lookahead == 'o') ADVANCE(19); + END_STATE(); + case 4: + if (lookahead == 'h') ADVANCE(20); + END_STATE(); + case 5: + if (lookahead == 'f') ADVANCE(21); + END_STATE(); + case 6: + if (lookahead == 'l') ADVANCE(22); + if (lookahead == 'x') ADVANCE(23); + END_STATE(); + case 7: + if (lookahead == '3') ADVANCE(24); + if (lookahead == '6') ADVANCE(25); + if (lookahead == 'a') ADVANCE(26); + if (lookahead == 'o') ADVANCE(27); + END_STATE(); + case 8: + ADVANCE_MAP( + '1', 28, + '3', 29, + '6', 30, + '8', 31, + 'f', 32, + 'm', 33, + 'n', 34, + 's', 35, + ); + END_STATE(); + case 9: + if (lookahead == 'e') ADVANCE(36); + END_STATE(); + case 10: + if (lookahead == 'r') ADVANCE(37); + END_STATE(); + case 11: + if (lookahead == 'u') ADVANCE(38); + END_STATE(); + case 12: + if (lookahead == 'e') ADVANCE(39); + END_STATE(); + case 13: + if (lookahead == 't') ADVANCE(40); + if (lookahead == 'y') ADVANCE(41); + END_STATE(); + case 14: + if (lookahead == 'r') ADVANCE(42); + END_STATE(); + case 15: + if (lookahead == '1') ADVANCE(43); + if (lookahead == '3') ADVANCE(44); + if (lookahead == '6') ADVANCE(45); + if (lookahead == '8') ADVANCE(46); + if (lookahead == 's') ADVANCE(47); + END_STATE(); + case 16: + if (lookahead == 'h') ADVANCE(48); + END_STATE(); + case 17: + if (lookahead == '\n') SKIP(0); + END_STATE(); + case 18: + if (lookahead == 'd') ADVANCE(49); + END_STATE(); + case 19: + if (lookahead == 'o') ADVANCE(50); + END_STATE(); + case 20: + if (lookahead == 'a') ADVANCE(51); + END_STATE(); + case 21: + ACCEPT_TOKEN(anon_sym_df); + END_STATE(); + case 22: + if (lookahead == 's') ADVANCE(52); + END_STATE(); + case 23: + if (lookahead == 'p') ADVANCE(53); + END_STATE(); + case 24: + if (lookahead == '2') ADVANCE(54); + END_STATE(); + case 25: + if (lookahead == '4') ADVANCE(55); + END_STATE(); + case 26: + if (lookahead == 'l') ADVANCE(56); + END_STATE(); + case 27: + if (lookahead == 'r') ADVANCE(57); + END_STATE(); + case 28: + if (lookahead == '2') ADVANCE(58); + if (lookahead == '6') ADVANCE(59); + END_STATE(); + case 29: + if (lookahead == '2') ADVANCE(60); + END_STATE(); + case 30: + if (lookahead == '4') ADVANCE(61); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_i8); + END_STATE(); + case 32: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 33: + if (lookahead == 'p') ADVANCE(62); + END_STATE(); + case 34: + ACCEPT_TOKEN(anon_sym_in); + END_STATE(); + case 35: + if (lookahead == 'z') ADVANCE(63); + END_STATE(); + case 36: + if (lookahead == 't') ADVANCE(64); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_or); + END_STATE(); + case 38: + if (lookahead == 'b') ADVANCE(65); + END_STATE(); + case 39: + if (lookahead == 't') ADVANCE(66); + END_STATE(); + case 40: + if (lookahead == 'r') ADVANCE(67); + END_STATE(); + case 41: + if (lookahead == 'm') ADVANCE(68); + END_STATE(); + case 42: + if (lookahead == 'u') ADVANCE(69); + END_STATE(); + case 43: + if (lookahead == '2') ADVANCE(70); + if (lookahead == '6') ADVANCE(71); + END_STATE(); + case 44: + if (lookahead == '2') ADVANCE(72); + END_STATE(); + case 45: + if (lookahead == '4') ADVANCE(73); + END_STATE(); + case 46: + ACCEPT_TOKEN(anon_sym_u8); + END_STATE(); + case 47: + if (lookahead == 'z') ADVANCE(74); + END_STATE(); + case 48: + if (lookahead == 'i') ADVANCE(75); + END_STATE(); + case 49: + ACCEPT_TOKEN(anon_sym_and); + END_STATE(); + case 50: + if (lookahead == 'l') ADVANCE(76); + END_STATE(); + case 51: + if (lookahead == 'r') ADVANCE(77); + END_STATE(); + case 52: + if (lookahead == 'e') ADVANCE(78); + END_STATE(); + case 53: + if (lookahead == 'r') ADVANCE(79); + END_STATE(); + case 54: + ACCEPT_TOKEN(anon_sym_f32); + END_STATE(); + case 55: + ACCEPT_TOKEN(anon_sym_f64); + END_STATE(); + case 56: + if (lookahead == 's') ADVANCE(80); + END_STATE(); + case 57: + ACCEPT_TOKEN(anon_sym_for); + END_STATE(); + case 58: + if (lookahead == '8') ADVANCE(81); + END_STATE(); + case 59: + ACCEPT_TOKEN(anon_sym_i16); + END_STATE(); + case 60: + ACCEPT_TOKEN(anon_sym_i32); + END_STATE(); + case 61: + ACCEPT_TOKEN(anon_sym_i64); + END_STATE(); + case 62: + ACCEPT_TOKEN(anon_sym_imp); + END_STATE(); + case 63: + ACCEPT_TOKEN(anon_sym_isz); + END_STATE(); + case 64: + ACCEPT_TOKEN(anon_sym_let); + END_STATE(); + case 65: + ACCEPT_TOKEN(anon_sym_pub); + END_STATE(); + case 66: + if (lookahead == 'u') ADVANCE(82); + END_STATE(); + case 67: + ACCEPT_TOKEN(anon_sym_str); + if (lookahead == 'u') ADVANCE(83); + END_STATE(); + case 68: + ACCEPT_TOKEN(anon_sym_sym); + END_STATE(); + case 69: + if (lookahead == 'e') ADVANCE(84); + END_STATE(); + case 70: + if (lookahead == '8') ADVANCE(85); + END_STATE(); + case 71: + ACCEPT_TOKEN(anon_sym_u16); + END_STATE(); + case 72: + ACCEPT_TOKEN(anon_sym_u32); + END_STATE(); + case 73: + ACCEPT_TOKEN(anon_sym_u64); + END_STATE(); + case 74: + ACCEPT_TOKEN(anon_sym_usz); + END_STATE(); + case 75: + if (lookahead == 'l') ADVANCE(86); + END_STATE(); + case 76: + ACCEPT_TOKEN(anon_sym_bool); + END_STATE(); + case 77: + ACCEPT_TOKEN(anon_sym_char); + END_STATE(); + case 78: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 79: + ACCEPT_TOKEN(anon_sym_expr); + END_STATE(); + case 80: + if (lookahead == 'e') ADVANCE(87); + END_STATE(); + case 81: + ACCEPT_TOKEN(anon_sym_i128); + END_STATE(); + case 82: + if (lookahead == 'r') ADVANCE(88); + END_STATE(); + case 83: + if (lookahead == 'c') ADVANCE(89); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_true); + END_STATE(); + case 85: + ACCEPT_TOKEN(anon_sym_u128); + END_STATE(); + case 86: + if (lookahead == 'e') ADVANCE(90); + END_STATE(); + case 87: + ACCEPT_TOKEN(anon_sym_false); + END_STATE(); + case 88: + if (lookahead == 'n') ADVANCE(91); + END_STATE(); + case 89: + if (lookahead == 't') ADVANCE(92); + END_STATE(); + case 90: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 91: + ACCEPT_TOKEN(anon_sym_return); + END_STATE(); + case 92: + ACCEPT_TOKEN(anon_sym_struct); + END_STATE(); + default: + return false; + } +} + +static const TSLexerMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 7}, + [3] = {.lex_state = 7}, + [4] = {.lex_state = 7}, + [5] = {.lex_state = 7}, + [6] = {.lex_state = 7}, + [7] = {.lex_state = 8}, + [8] = {.lex_state = 0}, + [9] = {.lex_state = 0}, + [10] = {.lex_state = 0}, + [11] = {.lex_state = 0}, + [12] = {.lex_state = 8}, + [13] = {.lex_state = 8}, + [14] = {.lex_state = 8}, + [15] = {.lex_state = 0}, + [16] = {.lex_state = 0}, + [17] = {.lex_state = 8}, + [18] = {.lex_state = 0}, + [19] = {.lex_state = 0}, + [20] = {.lex_state = 8}, + [21] = {.lex_state = 8}, + [22] = {.lex_state = 0}, + [23] = {.lex_state = 0}, + [24] = {.lex_state = 0}, + [25] = {.lex_state = 0}, + [26] = {.lex_state = 0}, + [27] = {.lex_state = 8}, + [28] = {.lex_state = 8}, + [29] = {.lex_state = 8}, + [30] = {.lex_state = 7}, + [31] = {.lex_state = 8}, + [32] = {.lex_state = 8}, + [33] = {.lex_state = 8}, + [34] = {.lex_state = 7}, + [35] = {.lex_state = 7}, + [36] = {.lex_state = 7}, + [37] = {.lex_state = 7}, + [38] = {.lex_state = 7}, + [39] = {.lex_state = 7}, + [40] = {.lex_state = 7}, + [41] = {.lex_state = 7}, + [42] = {.lex_state = 7}, + [43] = {.lex_state = 7}, + [44] = {.lex_state = 8}, + [45] = {.lex_state = 8}, + [46] = {.lex_state = 7}, + [47] = {.lex_state = 8}, + [48] = {.lex_state = 8}, + [49] = {.lex_state = 8}, + [50] = {.lex_state = 8}, + [51] = {.lex_state = 8}, + [52] = {.lex_state = 8}, + [53] = {.lex_state = 8}, + [54] = {.lex_state = 8}, + [55] = {.lex_state = 7}, + [56] = {.lex_state = 7}, + [57] = {.lex_state = 7}, + [58] = {.lex_state = 7}, + [59] = {.lex_state = 7}, + [60] = {.lex_state = 7}, + [61] = {.lex_state = 7}, + [62] = {.lex_state = 7}, + [63] = {.lex_state = 8}, + [64] = {.lex_state = 7}, + [65] = {.lex_state = 7}, + [66] = {.lex_state = 7}, + [67] = {.lex_state = 7}, + [68] = {.lex_state = 7}, + [69] = {.lex_state = 7}, + [70] = {.lex_state = 7}, + [71] = {.lex_state = 7}, + [72] = {.lex_state = 7}, + [73] = {.lex_state = 7}, + [74] = {.lex_state = 7}, + [75] = {.lex_state = 7}, + [76] = {.lex_state = 7}, + [77] = {.lex_state = 7}, + [78] = {.lex_state = 7}, + [79] = {.lex_state = 7}, + [80] = {.lex_state = 7}, + [81] = {.lex_state = 7}, + [82] = {.lex_state = 7}, + [83] = {.lex_state = 7}, + [84] = {.lex_state = 8}, + [85] = {.lex_state = 8}, + [86] = {.lex_state = 8}, + [87] = {.lex_state = 8}, + [88] = {.lex_state = 7}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 7}, + [91] = {.lex_state = 0}, + [92] = {.lex_state = 7}, + [93] = {.lex_state = 7}, + [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 = 7}, + [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 = 0}, + [125] = {.lex_state = 0}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 0}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 0}, + [131] = {.lex_state = 0}, + [132] = {.lex_state = 0}, + [133] = {.lex_state = 0}, + [134] = {.lex_state = 0}, + [135] = {.lex_state = 0}, + [136] = {.lex_state = 0}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 0}, + [139] = {.lex_state = 0}, + [140] = {.lex_state = 0}, + [141] = {.lex_state = 0}, + [142] = {.lex_state = 0}, + [143] = {.lex_state = 0}, + [144] = {.lex_state = 0}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 0}, + [148] = {.lex_state = 0}, + [149] = {.lex_state = 0}, + [150] = {.lex_state = 0}, + [151] = {.lex_state = 0}, + [152] = {.lex_state = 0}, + [153] = {.lex_state = 0}, + [154] = {.lex_state = 0}, + [155] = {.lex_state = 0}, + [156] = {.lex_state = 0}, + [157] = {.lex_state = 0}, + [158] = {.lex_state = 0}, + [159] = {.lex_state = 0}, + [160] = {.lex_state = 0}, + [161] = {.lex_state = 0}, + [162] = {.lex_state = 0}, + [163] = {.lex_state = 0}, + [164] = {.lex_state = 0}, + [165] = {.lex_state = 0}, + [166] = {.lex_state = 0}, + [167] = {.lex_state = 0}, + [168] = {.lex_state = 0}, + [169] = {.lex_state = 0}, + [170] = {.lex_state = 0}, + [171] = {.lex_state = 0}, + [172] = {.lex_state = 0}, + [173] = {.lex_state = 0}, + [174] = {.lex_state = 13}, + [175] = {.lex_state = 0}, + [176] = {.lex_state = 13}, + [177] = {.lex_state = 13}, + [178] = {.lex_state = 7}, + [179] = {.lex_state = 0}, + [180] = {.lex_state = 13}, + [181] = {.lex_state = 0}, + [182] = {.lex_state = 0}, + [183] = {.lex_state = 0}, + [184] = {.lex_state = 0}, + [185] = {.lex_state = 13}, + [186] = {.lex_state = 0}, + [187] = {.lex_state = 0}, + [188] = {.lex_state = 13}, + [189] = {.lex_state = 0}, + [190] = {.lex_state = 0}, + [191] = {.lex_state = 0}, + [192] = {.lex_state = 13}, + [193] = {.lex_state = 0}, + [194] = {.lex_state = 0}, + [195] = {.lex_state = 0}, + [196] = {.lex_state = 0}, + [197] = {.lex_state = 13}, + [198] = {.lex_state = 0}, + [199] = {.lex_state = 13}, + [200] = {.lex_state = 13}, + [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}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [STATE(0)] = { + [ts_builtin_sym_end] = ACTIONS(1), + [sym_IDENT] = ACTIONS(1), + [anon_sym_imp] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_df] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_struct] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_let] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_sym] = ACTIONS(1), + [anon_sym_for] = ACTIONS(1), + [anon_sym_in] = ACTIONS(1), + [anon_sym_DOT_DOT] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_return] = ACTIONS(1), + [anon_sym_or] = ACTIONS(1), + [anon_sym_and] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_BANG] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_true] = ACTIONS(1), + [anon_sym_false] = ACTIONS(1), + [anon_sym_pub] = ACTIONS(1), + [anon_sym_COLON_COLON] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_u8] = ACTIONS(1), + [anon_sym_i8] = ACTIONS(1), + [anon_sym_u16] = ACTIONS(1), + [anon_sym_i16] = ACTIONS(1), + [anon_sym_u32] = ACTIONS(1), + [anon_sym_i32] = ACTIONS(1), + [anon_sym_u64] = ACTIONS(1), + [anon_sym_i64] = ACTIONS(1), + [anon_sym_u128] = ACTIONS(1), + [anon_sym_i128] = ACTIONS(1), + [anon_sym_isz] = ACTIONS(1), + [anon_sym_usz] = ACTIONS(1), + [anon_sym_f32] = ACTIONS(1), + [anon_sym_f64] = ACTIONS(1), + [anon_sym_bool] = ACTIONS(1), + [anon_sym_str] = ACTIONS(1), + [anon_sym_char] = ACTIONS(1), + [anon_sym_expr] = ACTIONS(1), + [sym_NUM] = ACTIONS(1), + [sym_STRING] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + }, + [STATE(1)] = { + [sym_program] = STATE(165), + [sym_top_decl] = STATE(91), + [sym_imports_decls] = STATE(109), + [sym_func_decl] = STATE(109), + [sym_struct_decl] = STATE(109), + [aux_sym_program_repeat1] = STATE(91), + [ts_builtin_sym_end] = ACTIONS(5), + [anon_sym_imp] = ACTIONS(7), + [anon_sym_df] = ACTIONS(9), + [anon_sym_struct] = ACTIONS(11), + [sym_comment] = ACTIONS(3), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(15), 1, + anon_sym_df, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(19), 1, + anon_sym_struct, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(23), 1, + anon_sym_RBRACE, + ACTIONS(25), 1, + anon_sym_let, + ACTIONS(27), 1, + anon_sym_sym, + ACTIONS(29), 1, + anon_sym_for, + ACTIONS(31), 1, + anon_sym_while, + ACTIONS(33), 1, + anon_sym_if, + ACTIONS(35), 1, + anon_sym_return, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(163), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(5), 2, + sym_stmt, + aux_sym_block_repeat1, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + STATE(59), 4, + sym_func_decl, + sym_struct_decl, + sym_var_decl, + sym_sym_decl, + STATE(62), 7, + sym_declaration, + sym_for_stmt, + sym_while_stmt, + sym_if_stmt, + sym_return_stmt, + sym_expr_stmt, + sym_block, + [101] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(15), 1, + anon_sym_df, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(19), 1, + anon_sym_struct, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(25), 1, + anon_sym_let, + ACTIONS(27), 1, + anon_sym_sym, + ACTIONS(29), 1, + anon_sym_for, + ACTIONS(31), 1, + anon_sym_while, + ACTIONS(33), 1, + anon_sym_if, + ACTIONS(35), 1, + anon_sym_return, + ACTIONS(43), 1, + anon_sym_RBRACE, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(163), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(4), 2, + sym_stmt, + aux_sym_block_repeat1, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + STATE(59), 4, + sym_func_decl, + sym_struct_decl, + sym_var_decl, + sym_sym_decl, + STATE(62), 7, + sym_declaration, + sym_for_stmt, + sym_while_stmt, + sym_if_stmt, + sym_return_stmt, + sym_expr_stmt, + sym_block, + [202] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(15), 1, + anon_sym_df, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(19), 1, + anon_sym_struct, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(25), 1, + anon_sym_let, + ACTIONS(27), 1, + anon_sym_sym, + ACTIONS(29), 1, + anon_sym_for, + ACTIONS(31), 1, + anon_sym_while, + ACTIONS(33), 1, + anon_sym_if, + ACTIONS(35), 1, + anon_sym_return, + ACTIONS(45), 1, + anon_sym_RBRACE, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(163), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(5), 2, + sym_stmt, + aux_sym_block_repeat1, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + STATE(59), 4, + sym_func_decl, + sym_struct_decl, + sym_var_decl, + sym_sym_decl, + STATE(62), 7, + sym_declaration, + sym_for_stmt, + sym_while_stmt, + sym_if_stmt, + sym_return_stmt, + sym_expr_stmt, + sym_block, + [303] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(47), 1, + sym_IDENT, + ACTIONS(50), 1, + anon_sym_df, + ACTIONS(53), 1, + anon_sym_LPAREN, + ACTIONS(56), 1, + anon_sym_struct, + ACTIONS(59), 1, + anon_sym_LBRACE, + ACTIONS(62), 1, + anon_sym_RBRACE, + ACTIONS(64), 1, + anon_sym_let, + ACTIONS(67), 1, + anon_sym_sym, + ACTIONS(70), 1, + anon_sym_for, + ACTIONS(73), 1, + anon_sym_while, + ACTIONS(76), 1, + anon_sym_if, + ACTIONS(79), 1, + anon_sym_return, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(163), 1, + sym_expression, + ACTIONS(82), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(85), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(88), 2, + sym_NUM, + sym_STRING, + STATE(5), 2, + sym_stmt, + aux_sym_block_repeat1, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + STATE(59), 4, + sym_func_decl, + sym_struct_decl, + sym_var_decl, + sym_sym_decl, + STATE(62), 7, + sym_declaration, + sym_for_stmt, + sym_while_stmt, + sym_if_stmt, + sym_return_stmt, + sym_expr_stmt, + sym_block, + [404] = 28, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(15), 1, + anon_sym_df, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(19), 1, + anon_sym_struct, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(25), 1, + anon_sym_let, + ACTIONS(27), 1, + anon_sym_sym, + ACTIONS(29), 1, + anon_sym_for, + ACTIONS(31), 1, + anon_sym_while, + ACTIONS(33), 1, + anon_sym_if, + ACTIONS(35), 1, + anon_sym_return, + ACTIONS(91), 1, + anon_sym_RBRACE, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(163), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(2), 2, + sym_stmt, + aux_sym_block_repeat1, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + STATE(59), 4, + sym_func_decl, + sym_struct_decl, + sym_var_decl, + sym_sym_decl, + STATE(62), 7, + sym_declaration, + sym_for_stmt, + sym_while_stmt, + sym_if_stmt, + sym_return_stmt, + sym_expr_stmt, + sym_block, + [505] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(95), 1, + anon_sym_EQ, + ACTIONS(99), 1, + anon_sym_DOT, + STATE(114), 2, + sym_field_access, + aux_sym_assignment_repeat1, + ACTIONS(97), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(93), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_COLON_COLON, + [544] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + ACTIONS(104), 1, + anon_sym_LBRACE, + STATE(17), 1, + sym__path_identifier, + STATE(112), 1, + sym_block, + STATE(181), 1, + sym_path, + STATE(157), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [587] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + ACTIONS(104), 1, + anon_sym_LBRACE, + STATE(17), 1, + sym__path_identifier, + STATE(111), 1, + sym_block, + STATE(181), 1, + sym_path, + STATE(146), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [630] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(69), 1, + sym_block, + STATE(181), 1, + sym_path, + STATE(158), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [673] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(71), 1, + sym_block, + STATE(181), 1, + sym_path, + STATE(159), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [716] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(110), 1, + anon_sym_LPAREN, + ACTIONS(114), 1, + anon_sym_LBRACK, + ACTIONS(116), 1, + anon_sym_DOT, + STATE(14), 2, + sym_field_access, + aux_sym_call_expression_repeat1, + ACTIONS(112), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(108), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [756] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(120), 1, + anon_sym_LPAREN, + ACTIONS(125), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_DOT, + STATE(13), 2, + sym_field_access, + aux_sym_call_expression_repeat1, + ACTIONS(123), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(118), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [796] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(110), 1, + anon_sym_LPAREN, + ACTIONS(114), 1, + anon_sym_LBRACK, + ACTIONS(116), 1, + anon_sym_DOT, + STATE(13), 2, + sym_field_access, + aux_sym_call_expression_repeat1, + ACTIONS(133), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(131), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [836] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(120), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [873] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(123), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [910] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(139), 1, + anon_sym_COLON_COLON, + ACTIONS(137), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(135), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [943] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(178), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [980] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(122), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [1017] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(97), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(93), 19, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + anon_sym_COLON_COLON, + [1048] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(143), 5, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(141), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1079] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(196), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [1116] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(150), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [1153] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(151), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [1190] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(149), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [1227] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(102), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(181), 1, + sym_path, + STATE(198), 2, + sym__type, + sym_native_type, + ACTIONS(106), 18, + anon_sym_u8, + anon_sym_i8, + anon_sym_u16, + anon_sym_i16, + anon_sym_u32, + anon_sym_i32, + anon_sym_u64, + anon_sym_i64, + anon_sym_u128, + anon_sym_i128, + anon_sym_isz, + anon_sym_usz, + anon_sym_f32, + anon_sym_f64, + anon_sym_bool, + anon_sym_str, + anon_sym_char, + anon_sym_expr, + [1264] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(147), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(145), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1294] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(151), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(149), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1324] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(155), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(153), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1354] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(157), 1, + anon_sym_RPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(133), 1, + sym_expression, + STATE(162), 1, + sym_args_list, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1412] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(159), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1442] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(165), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(163), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1472] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(169), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT, + ACTIONS(167), 18, + anon_sym_SEMI, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_COMMA, + [1502] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(94), 1, + sym_expression, + STATE(96), 1, + sym_assignment_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1554] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(99), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1606] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(182), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1658] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(166), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1710] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(128), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1762] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(148), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1814] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(156), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1866] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(126), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1918] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(155), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [1970] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(13), 1, + sym_IDENT, + ACTIONS(17), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(52), 1, + sym_expression_no_assign, + STATE(96), 1, + sym_assignment_expression, + STATE(184), 1, + sym_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + STATE(63), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(97), 2, + sym_assignment, + sym_initializer, + [2022] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(173), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(171), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [2049] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(177), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(175), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [2076] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(183), 1, + anon_sym_else, + ACTIONS(181), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(179), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2105] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(187), 1, + anon_sym_and, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(185), 8, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_RBRACK, + anon_sym_COMMA, + [2144] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(185), 9, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_RBRACK, + anon_sym_COMMA, + [2181] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(185), 11, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_RBRACK, + anon_sym_COMMA, + [2216] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(201), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(185), 13, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_RBRACK, + anon_sym_COMMA, + [2249] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(201), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(185), 15, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_RBRACK, + anon_sym_COMMA, + [2280] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(187), 1, + anon_sym_and, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(205), 1, + anon_sym_LBRACE, + ACTIONS(207), 1, + anon_sym_or, + STATE(95), 1, + sym_struct_init, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(203), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [2325] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(211), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(209), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [2352] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(201), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(185), 16, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DOT_DOT, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_RBRACK, + anon_sym_COMMA, + [2379] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(215), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(213), 12, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_else, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2406] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(219), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(217), 12, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_else, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2433] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(223), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(221), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2459] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(227), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(225), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2485] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(231), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(229), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2511] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(235), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(233), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2537] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(239), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(237), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2563] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(243), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(241), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2589] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(177), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + ACTIONS(245), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + ACTIONS(175), 10, + anon_sym_LBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + [2617] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(250), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(248), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2643] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(254), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(252), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2669] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(258), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(256), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2695] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(262), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(260), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2721] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(266), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(264), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2747] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(270), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(268), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2773] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(272), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2799] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(276), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2825] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(282), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(280), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2851] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(286), 7, + anon_sym_LPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_DASH, + anon_sym_BANG, + sym_NUM, + sym_STRING, + ACTIONS(284), 11, + anon_sym_df, + anon_sym_struct, + anon_sym_let, + anon_sym_sym, + anon_sym_for, + anon_sym_while, + anon_sym_if, + anon_sym_return, + anon_sym_true, + anon_sym_false, + sym_IDENT, + [2877] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(47), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [2919] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(51), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [2961] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(49), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3003] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(50), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3045] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(84), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3087] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(54), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3129] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(48), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3171] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(85), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3213] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(86), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3255] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(87), 1, + sym_expression_no_assign, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(45), 2, + sym_binary_expression, + sym_non_binary_expression, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3297] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(187), 1, + anon_sym_and, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(207), 1, + anon_sym_or, + ACTIONS(290), 1, + anon_sym_DOT_DOT, + STATE(73), 1, + sym_block, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + [3338] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(187), 1, + anon_sym_and, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(207), 1, + anon_sym_or, + STATE(67), 1, + sym_block, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + [3376] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(187), 1, + anon_sym_and, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(207), 1, + anon_sym_or, + STATE(46), 1, + sym_block, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + [3414] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + ACTIONS(187), 1, + anon_sym_and, + ACTIONS(197), 1, + anon_sym_STAR, + ACTIONS(199), 1, + anon_sym_SLASH, + ACTIONS(207), 1, + anon_sym_or, + STATE(60), 1, + sym_block, + ACTIONS(189), 2, + anon_sym_EQ_EQ, + anon_sym_BANG_EQ, + ACTIONS(191), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(193), 2, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(195), 2, + anon_sym_PLUS, + anon_sym_DASH, + [3452] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(288), 1, + sym_IDENT, + STATE(12), 1, + sym_primary, + STATE(17), 1, + sym__path_identifier, + STATE(29), 1, + sym_path, + STATE(44), 1, + sym_non_binary_expression, + ACTIONS(37), 2, + anon_sym_DASH, + anon_sym_BANG, + ACTIONS(39), 2, + anon_sym_true, + anon_sym_false, + ACTIONS(41), 2, + sym_NUM, + sym_STRING, + STATE(53), 2, + sym_unary_expression, + sym_call_expression, + [3490] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(292), 1, + ts_builtin_sym_end, + ACTIONS(294), 1, + anon_sym_imp, + ACTIONS(297), 1, + anon_sym_df, + ACTIONS(300), 1, + anon_sym_struct, + STATE(89), 2, + sym_top_decl, + aux_sym_program_repeat1, + STATE(109), 3, + sym_imports_decls, + sym_func_decl, + sym_struct_decl, + [3515] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(93), 2, + anon_sym_LT, + anon_sym_COLON_COLON, + ACTIONS(303), 7, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_GT, + anon_sym_COMMA, + [3532] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_imp, + ACTIONS(9), 1, + anon_sym_df, + ACTIONS(11), 1, + anon_sym_struct, + ACTIONS(305), 1, + ts_builtin_sym_end, + STATE(89), 2, + sym_top_decl, + aux_sym_program_repeat1, + STATE(109), 3, + sym_imports_decls, + sym_func_decl, + sym_struct_decl, + [3557] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(307), 7, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_GT, + anon_sym_COMMA, + [3570] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(309), 7, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_EQ, + anon_sym_GT, + anon_sym_COMMA, + [3583] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(311), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3594] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(313), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3605] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3616] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(317), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3627] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(319), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3638] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(321), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3649] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(323), 5, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_RBRACK, + anon_sym_COMMA, + [3660] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(219), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3670] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(282), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3680] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(215), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3690] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(325), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3700] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(327), 1, + sym_IDENT, + ACTIONS(329), 1, + anon_sym_RBRACE, + ACTIONS(331), 1, + anon_sym_pub, + STATE(160), 1, + sym_struct_fields, + [3716] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(333), 1, + anon_sym_EQ, + ACTIONS(335), 1, + anon_sym_DOT, + STATE(106), 2, + sym_field_access, + aux_sym_assignment_repeat1, + [3730] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(338), 1, + sym_IDENT, + ACTIONS(340), 1, + anon_sym_LBRACE, + ACTIONS(342), 1, + anon_sym_STAR, + STATE(140), 1, + sym_import_path, + [3746] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(266), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3756] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(344), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3766] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3776] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3786] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(270), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3796] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(348), 1, + anon_sym_COLON_COLON, + ACTIONS(346), 3, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COMMA, + [3808] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(350), 1, + anon_sym_EQ, + ACTIONS(352), 1, + anon_sym_DOT, + STATE(106), 2, + sym_field_access, + aux_sym_assignment_repeat1, + [3822] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(327), 1, + sym_IDENT, + ACTIONS(331), 1, + anon_sym_pub, + ACTIONS(354), 1, + anon_sym_RBRACE, + STATE(195), 1, + sym_struct_fields, + [3838] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(223), 4, + ts_builtin_sym_end, + anon_sym_imp, + anon_sym_df, + anon_sym_struct, + [3848] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(356), 1, + sym_IDENT, + STATE(17), 1, + sym__path_identifier, + STATE(28), 1, + sym_path, + [3861] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(358), 1, + sym_IDENT, + STATE(168), 1, + sym_bracket_args, + STATE(170), 1, + sym_substitution_args, + [3874] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(360), 1, + anon_sym_RBRACE, + ACTIONS(362), 1, + anon_sym_COMMA, + STATE(125), 1, + aux_sym_import_path_repeat1, + [3887] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(364), 1, + anon_sym_RPAREN, + ACTIONS(366), 1, + anon_sym_COMMA, + STATE(142), 1, + aux_sym_param_list_repeat1, + [3900] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(368), 1, + anon_sym_RPAREN, + ACTIONS(370), 1, + anon_sym_COMMA, + STATE(127), 1, + aux_sym_args_list_repeat1, + [3913] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(372), 1, + anon_sym_RBRACE, + ACTIONS(374), 1, + anon_sym_COMMA, + STATE(138), 1, + aux_sym_struct_fields_repeat1, + [3926] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(374), 1, + anon_sym_COMMA, + ACTIONS(376), 1, + anon_sym_RBRACE, + STATE(130), 1, + aux_sym_struct_fields_repeat1, + [3939] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(378), 3, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COMMA, + [3948] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(380), 1, + anon_sym_RBRACE, + ACTIONS(382), 1, + anon_sym_COMMA, + STATE(125), 1, + aux_sym_import_path_repeat1, + [3961] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(385), 1, + anon_sym_RBRACE, + ACTIONS(387), 1, + anon_sym_COMMA, + STATE(131), 1, + aux_sym_struct_init_repeat1, + [3974] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(389), 1, + anon_sym_RPAREN, + ACTIONS(391), 1, + anon_sym_COMMA, + STATE(127), 1, + aux_sym_args_list_repeat1, + [3987] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(394), 1, + anon_sym_RBRACK, + ACTIONS(396), 1, + anon_sym_COMMA, + STATE(132), 1, + aux_sym_substitution_args_repeat1, + [4000] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(398), 1, + sym_IDENT, + ACTIONS(400), 1, + anon_sym_RPAREN, + STATE(175), 1, + sym_param_list, + [4013] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(372), 1, + anon_sym_RBRACE, + ACTIONS(374), 1, + anon_sym_COMMA, + STATE(139), 1, + aux_sym_struct_fields_repeat1, + [4026] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(387), 1, + anon_sym_COMMA, + ACTIONS(402), 1, + anon_sym_RBRACE, + STATE(135), 1, + aux_sym_struct_init_repeat1, + [4039] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(396), 1, + anon_sym_COMMA, + ACTIONS(404), 1, + anon_sym_RBRACK, + STATE(136), 1, + aux_sym_substitution_args_repeat1, + [4052] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(370), 1, + anon_sym_COMMA, + ACTIONS(406), 1, + anon_sym_RPAREN, + STATE(121), 1, + aux_sym_args_list_repeat1, + [4065] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(362), 1, + anon_sym_COMMA, + ACTIONS(408), 1, + anon_sym_RBRACE, + STATE(119), 1, + aux_sym_import_path_repeat1, + [4078] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(410), 1, + anon_sym_RBRACE, + ACTIONS(412), 1, + anon_sym_COMMA, + STATE(135), 1, + aux_sym_struct_init_repeat1, + [4091] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(415), 1, + anon_sym_RBRACK, + ACTIONS(417), 1, + anon_sym_COMMA, + STATE(136), 1, + aux_sym_substitution_args_repeat1, + [4104] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(420), 1, + anon_sym_RPAREN, + ACTIONS(422), 1, + anon_sym_COMMA, + STATE(137), 1, + aux_sym_param_list_repeat1, + [4117] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(374), 1, + anon_sym_COMMA, + ACTIONS(425), 1, + anon_sym_RBRACE, + STATE(139), 1, + aux_sym_struct_fields_repeat1, + [4130] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(427), 1, + anon_sym_RBRACE, + ACTIONS(429), 1, + anon_sym_COMMA, + STATE(139), 1, + aux_sym_struct_fields_repeat1, + [4143] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(432), 3, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COMMA, + [4152] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(434), 3, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_COMMA, + [4161] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(366), 1, + anon_sym_COMMA, + ACTIONS(436), 1, + anon_sym_RPAREN, + STATE(137), 1, + aux_sym_param_list_repeat1, + [4174] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(398), 1, + sym_IDENT, + ACTIONS(438), 1, + anon_sym_RPAREN, + STATE(203), 1, + sym_param_list, + [4187] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(338), 1, + sym_IDENT, + STATE(147), 1, + sym_import_path, + [4197] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + STATE(65), 1, + sym_block, + [4207] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(104), 1, + anon_sym_LBRACE, + STATE(102), 1, + sym_block, + [4217] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(380), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [4225] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(389), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [4233] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(440), 2, + anon_sym_RPAREN, + anon_sym_COMMA, + [4241] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(442), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [4249] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(444), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [4257] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(338), 1, + sym_IDENT, + STATE(189), 1, + sym_import_path, + [4267] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(446), 1, + sym_IDENT, + ACTIONS(448), 1, + anon_sym_pub, + [4277] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(338), 1, + sym_IDENT, + STATE(134), 1, + sym_import_path, + [4287] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(450), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [4295] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(452), 2, + anon_sym_RBRACK, + anon_sym_COMMA, + [4303] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(104), 1, + anon_sym_LBRACE, + STATE(110), 1, + sym_block, + [4313] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + STATE(70), 1, + sym_block, + [4323] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(21), 1, + anon_sym_LBRACE, + STATE(72), 1, + sym_block, + [4333] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(454), 1, + anon_sym_RBRACE, + [4340] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(456), 1, + sym_IDENT, + [4347] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(458), 1, + anon_sym_RPAREN, + [4354] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(460), 1, + anon_sym_SEMI, + [4361] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(462), 1, + anon_sym_in, + [4368] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(464), 1, + ts_builtin_sym_end, + [4375] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(466), 1, + anon_sym_SEMI, + [4382] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(468), 1, + anon_sym_EQ, + [4389] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(470), 1, + anon_sym_RBRACK, + [4396] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(472), 1, + sym_IDENT, + [4403] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(474), 1, + anon_sym_RBRACK, + [4410] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(476), 1, + sym_IDENT, + [4417] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(478), 1, + sym_IDENT, + [4424] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(480), 1, + sym_IDENT, + [4431] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_COLON, + [4438] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(484), 1, + anon_sym_RPAREN, + [4445] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(486), 1, + anon_sym_COLON, + [4452] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(488), 1, + anon_sym_COLON, + [4459] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(490), 1, + anon_sym_GT, + [4466] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(492), 1, + anon_sym_EQ, + [4473] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(494), 1, + anon_sym_COLON, + [4480] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(496), 1, + anon_sym_LT, + [4487] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(498), 1, + anon_sym_SEMI, + [4494] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(500), 1, + sym_IDENT, + [4501] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(502), 1, + anon_sym_RPAREN, + [4508] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(504), 1, + anon_sym_COLON, + [4515] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(506), 1, + sym_IDENT, + [4522] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(508), 1, + sym_IDENT, + [4529] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(510), 1, + anon_sym_COLON, + [4536] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(512), 1, + anon_sym_SEMI, + [4543] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(514), 1, + sym_IDENT, + [4550] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(516), 1, + anon_sym_LPAREN, + [4557] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(518), 1, + anon_sym_COLON, + [4564] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(520), 1, + sym_IDENT, + [4571] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(522), 1, + anon_sym_LBRACE, + [4578] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + anon_sym_RBRACE, + [4585] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(526), 1, + anon_sym_EQ, + [4592] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(528), 1, + anon_sym_COLON, + [4599] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(530), 1, + anon_sym_SEMI, + [4606] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(532), 1, + anon_sym_COLON, + [4613] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(534), 1, + anon_sym_COLON, + [4620] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(536), 1, + anon_sym_LBRACE, + [4627] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(538), 1, + sym_IDENT, + [4634] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(540), 1, + anon_sym_RPAREN, + [4641] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(542), 1, + sym_IDENT, + [4648] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(544), 1, + anon_sym_LPAREN, + [4655] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(546), 1, + sym_IDENT, + [4662] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(548), 1, + sym_IDENT, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 101, + [SMALL_STATE(4)] = 202, + [SMALL_STATE(5)] = 303, + [SMALL_STATE(6)] = 404, + [SMALL_STATE(7)] = 505, + [SMALL_STATE(8)] = 544, + [SMALL_STATE(9)] = 587, + [SMALL_STATE(10)] = 630, + [SMALL_STATE(11)] = 673, + [SMALL_STATE(12)] = 716, + [SMALL_STATE(13)] = 756, + [SMALL_STATE(14)] = 796, + [SMALL_STATE(15)] = 836, + [SMALL_STATE(16)] = 873, + [SMALL_STATE(17)] = 910, + [SMALL_STATE(18)] = 943, + [SMALL_STATE(19)] = 980, + [SMALL_STATE(20)] = 1017, + [SMALL_STATE(21)] = 1048, + [SMALL_STATE(22)] = 1079, + [SMALL_STATE(23)] = 1116, + [SMALL_STATE(24)] = 1153, + [SMALL_STATE(25)] = 1190, + [SMALL_STATE(26)] = 1227, + [SMALL_STATE(27)] = 1264, + [SMALL_STATE(28)] = 1294, + [SMALL_STATE(29)] = 1324, + [SMALL_STATE(30)] = 1354, + [SMALL_STATE(31)] = 1412, + [SMALL_STATE(32)] = 1442, + [SMALL_STATE(33)] = 1472, + [SMALL_STATE(34)] = 1502, + [SMALL_STATE(35)] = 1554, + [SMALL_STATE(36)] = 1606, + [SMALL_STATE(37)] = 1658, + [SMALL_STATE(38)] = 1710, + [SMALL_STATE(39)] = 1762, + [SMALL_STATE(40)] = 1814, + [SMALL_STATE(41)] = 1866, + [SMALL_STATE(42)] = 1918, + [SMALL_STATE(43)] = 1970, + [SMALL_STATE(44)] = 2022, + [SMALL_STATE(45)] = 2049, + [SMALL_STATE(46)] = 2076, + [SMALL_STATE(47)] = 2105, + [SMALL_STATE(48)] = 2144, + [SMALL_STATE(49)] = 2181, + [SMALL_STATE(50)] = 2216, + [SMALL_STATE(51)] = 2249, + [SMALL_STATE(52)] = 2280, + [SMALL_STATE(53)] = 2325, + [SMALL_STATE(54)] = 2352, + [SMALL_STATE(55)] = 2379, + [SMALL_STATE(56)] = 2406, + [SMALL_STATE(57)] = 2433, + [SMALL_STATE(58)] = 2459, + [SMALL_STATE(59)] = 2485, + [SMALL_STATE(60)] = 2511, + [SMALL_STATE(61)] = 2537, + [SMALL_STATE(62)] = 2563, + [SMALL_STATE(63)] = 2589, + [SMALL_STATE(64)] = 2617, + [SMALL_STATE(65)] = 2643, + [SMALL_STATE(66)] = 2669, + [SMALL_STATE(67)] = 2695, + [SMALL_STATE(68)] = 2721, + [SMALL_STATE(69)] = 2747, + [SMALL_STATE(70)] = 2773, + [SMALL_STATE(71)] = 2799, + [SMALL_STATE(72)] = 2825, + [SMALL_STATE(73)] = 2851, + [SMALL_STATE(74)] = 2877, + [SMALL_STATE(75)] = 2919, + [SMALL_STATE(76)] = 2961, + [SMALL_STATE(77)] = 3003, + [SMALL_STATE(78)] = 3045, + [SMALL_STATE(79)] = 3087, + [SMALL_STATE(80)] = 3129, + [SMALL_STATE(81)] = 3171, + [SMALL_STATE(82)] = 3213, + [SMALL_STATE(83)] = 3255, + [SMALL_STATE(84)] = 3297, + [SMALL_STATE(85)] = 3338, + [SMALL_STATE(86)] = 3376, + [SMALL_STATE(87)] = 3414, + [SMALL_STATE(88)] = 3452, + [SMALL_STATE(89)] = 3490, + [SMALL_STATE(90)] = 3515, + [SMALL_STATE(91)] = 3532, + [SMALL_STATE(92)] = 3557, + [SMALL_STATE(93)] = 3570, + [SMALL_STATE(94)] = 3583, + [SMALL_STATE(95)] = 3594, + [SMALL_STATE(96)] = 3605, + [SMALL_STATE(97)] = 3616, + [SMALL_STATE(98)] = 3627, + [SMALL_STATE(99)] = 3638, + [SMALL_STATE(100)] = 3649, + [SMALL_STATE(101)] = 3660, + [SMALL_STATE(102)] = 3670, + [SMALL_STATE(103)] = 3680, + [SMALL_STATE(104)] = 3690, + [SMALL_STATE(105)] = 3700, + [SMALL_STATE(106)] = 3716, + [SMALL_STATE(107)] = 3730, + [SMALL_STATE(108)] = 3746, + [SMALL_STATE(109)] = 3756, + [SMALL_STATE(110)] = 3766, + [SMALL_STATE(111)] = 3776, + [SMALL_STATE(112)] = 3786, + [SMALL_STATE(113)] = 3796, + [SMALL_STATE(114)] = 3808, + [SMALL_STATE(115)] = 3822, + [SMALL_STATE(116)] = 3838, + [SMALL_STATE(117)] = 3848, + [SMALL_STATE(118)] = 3861, + [SMALL_STATE(119)] = 3874, + [SMALL_STATE(120)] = 3887, + [SMALL_STATE(121)] = 3900, + [SMALL_STATE(122)] = 3913, + [SMALL_STATE(123)] = 3926, + [SMALL_STATE(124)] = 3939, + [SMALL_STATE(125)] = 3948, + [SMALL_STATE(126)] = 3961, + [SMALL_STATE(127)] = 3974, + [SMALL_STATE(128)] = 3987, + [SMALL_STATE(129)] = 4000, + [SMALL_STATE(130)] = 4013, + [SMALL_STATE(131)] = 4026, + [SMALL_STATE(132)] = 4039, + [SMALL_STATE(133)] = 4052, + [SMALL_STATE(134)] = 4065, + [SMALL_STATE(135)] = 4078, + [SMALL_STATE(136)] = 4091, + [SMALL_STATE(137)] = 4104, + [SMALL_STATE(138)] = 4117, + [SMALL_STATE(139)] = 4130, + [SMALL_STATE(140)] = 4143, + [SMALL_STATE(141)] = 4152, + [SMALL_STATE(142)] = 4161, + [SMALL_STATE(143)] = 4174, + [SMALL_STATE(144)] = 4187, + [SMALL_STATE(145)] = 4197, + [SMALL_STATE(146)] = 4207, + [SMALL_STATE(147)] = 4217, + [SMALL_STATE(148)] = 4225, + [SMALL_STATE(149)] = 4233, + [SMALL_STATE(150)] = 4241, + [SMALL_STATE(151)] = 4249, + [SMALL_STATE(152)] = 4257, + [SMALL_STATE(153)] = 4267, + [SMALL_STATE(154)] = 4277, + [SMALL_STATE(155)] = 4287, + [SMALL_STATE(156)] = 4295, + [SMALL_STATE(157)] = 4303, + [SMALL_STATE(158)] = 4313, + [SMALL_STATE(159)] = 4323, + [SMALL_STATE(160)] = 4333, + [SMALL_STATE(161)] = 4340, + [SMALL_STATE(162)] = 4347, + [SMALL_STATE(163)] = 4354, + [SMALL_STATE(164)] = 4361, + [SMALL_STATE(165)] = 4368, + [SMALL_STATE(166)] = 4375, + [SMALL_STATE(167)] = 4382, + [SMALL_STATE(168)] = 4389, + [SMALL_STATE(169)] = 4396, + [SMALL_STATE(170)] = 4403, + [SMALL_STATE(171)] = 4410, + [SMALL_STATE(172)] = 4417, + [SMALL_STATE(173)] = 4424, + [SMALL_STATE(174)] = 4431, + [SMALL_STATE(175)] = 4438, + [SMALL_STATE(176)] = 4445, + [SMALL_STATE(177)] = 4452, + [SMALL_STATE(178)] = 4459, + [SMALL_STATE(179)] = 4466, + [SMALL_STATE(180)] = 4473, + [SMALL_STATE(181)] = 4480, + [SMALL_STATE(182)] = 4487, + [SMALL_STATE(183)] = 4494, + [SMALL_STATE(184)] = 4501, + [SMALL_STATE(185)] = 4508, + [SMALL_STATE(186)] = 4515, + [SMALL_STATE(187)] = 4522, + [SMALL_STATE(188)] = 4529, + [SMALL_STATE(189)] = 4536, + [SMALL_STATE(190)] = 4543, + [SMALL_STATE(191)] = 4550, + [SMALL_STATE(192)] = 4557, + [SMALL_STATE(193)] = 4564, + [SMALL_STATE(194)] = 4571, + [SMALL_STATE(195)] = 4578, + [SMALL_STATE(196)] = 4585, + [SMALL_STATE(197)] = 4592, + [SMALL_STATE(198)] = 4599, + [SMALL_STATE(199)] = 4606, + [SMALL_STATE(200)] = 4613, + [SMALL_STATE(201)] = 4620, + [SMALL_STATE(202)] = 4627, + [SMALL_STATE(203)] = 4634, + [SMALL_STATE(204)] = 4641, + [SMALL_STATE(205)] = 4648, + [SMALL_STATE(206)] = 4655, + [SMALL_STATE(207)] = 4662, +}; + +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_program, 0, 0, 0), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(206), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(204), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(161), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(172), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(202), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [47] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(7), + [50] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(206), + [53] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(43), + [56] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(204), + [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(6), + [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), + [64] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(161), + [67] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(172), + [70] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(202), + [73] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(83), + [76] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(82), + [79] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(36), + [82] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(88), + [85] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(29), + [88] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2, 0, 0), SHIFT_REPEAT(29), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [93] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__path_identifier, 1, 0, 3), + [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [97] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__path_identifier, 1, 0, 3), + [99] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__path_identifier, 1, 0, 3), SHIFT(187), + [102] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [106] = {.entry = {.count = 1, .reusable = false}}, SHIFT(93), + [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 1, 0, 7), + [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [112] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 1, 0, 7), + [114] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [116] = {.entry = {.count = 1, .reusable = false}}, SHIFT(187), + [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 19), + [120] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 19), SHIFT_REPEAT(30), + [123] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 19), + [125] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 19), SHIFT_REPEAT(118), + [128] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 19), SHIFT_REPEAT(187), + [131] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call_expression, 2, 0, 11), + [133] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call_expression, 2, 0, 11), + [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_path, 1, 0, 5), + [137] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_path, 1, 0, 5), + [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_access, 2, 0, 17), + [143] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_access, 2, 0, 17), + [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primary, 3, 0, 0), + [147] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primary, 3, 0, 0), + [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_path, 3, 0, 12), + [151] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_path, 3, 0, 12), + [153] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primary, 1, 0, 0), + [155] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primary, 1, 0, 0), + [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 3, 0, 21), + [161] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_call_expression_repeat1, 3, 0, 21), + [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 0), + [165] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_call_expression_repeat1, 2, 0, 0), + [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_call_expression_repeat1, 3, 0, 0), + [169] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_call_expression_repeat1, 3, 0, 0), + [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 10), + [173] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 10), + [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_no_assign, 1, 0, 0), + [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_no_assign, 1, 0, 0), + [179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_stmt, 3, 0, 14), + [181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_stmt, 3, 0, 14), + [183] = {.entry = {.count = 1, .reusable = false}}, SHIFT(145), + [185] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 18), + [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [191] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [199] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [201] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 18), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer, 1, 0, 0), + [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_non_binary_expression, 1, 0, 0), + [211] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_non_binary_expression, 1, 0, 0), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2, 0, 0), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2, 0, 0), + [217] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 3, 0, 0), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3, 0, 0), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_decl, 5, 0, 6), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_decl, 5, 0, 6), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expr_stmt, 2, 0, 0), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expr_stmt, 2, 0, 0), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_declaration, 1, 0, 0), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 1, 0, 0), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_stmt, 3, 0, 14), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_stmt, 3, 0, 14), + [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_stmt, 3, 0, 15), + [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_stmt, 3, 0, 15), + [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_stmt, 1, 0, 0), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_stmt, 1, 0, 0), + [245] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_expression, 1, 0, 0), REDUCE(sym_expression_no_assign, 1, 0, 0), + [248] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sym_decl, 5, 0, 22), + [250] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sym_decl, 5, 0, 22), + [252] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_stmt, 5, 0, 24), + [254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_stmt, 5, 0, 24), + [256] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_var_decl, 7, 0, 27), + [258] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_var_decl, 7, 0, 27), + [260] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_stmt, 7, 0, 28), + [262] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_stmt, 7, 0, 28), + [264] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_struct_decl, 4, 0, 1), + [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_decl, 4, 0, 1), + [268] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_func_decl, 5, 0, 4), + [270] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_func_decl, 5, 0, 4), + [272] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_func_decl, 6, 0, 8), + [274] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_func_decl, 6, 0, 8), + [276] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_func_decl, 6, 0, 9), + [278] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_func_decl, 6, 0, 9), + [280] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_func_decl, 7, 0, 13), + [282] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_func_decl, 7, 0, 13), + [284] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_stmt, 5, 0, 23), + [286] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_stmt, 5, 0, 23), + [288] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [290] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), + [294] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(152), + [297] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(173), + [300] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(193), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type, 1, 0, 2), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 1, 0, 0), + [307] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type, 4, 0, 0), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_native_type, 1, 0, 0), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, 0, 16), + [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_initializer, 2, 0, 0), + [315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1, 0, 0), + [317] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment_expression, 1, 0, 0), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_init, 5, 0, 0), + [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 4, 0, 20), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_init, 6, 0, 0), + [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_imports_decls, 3, 0, 0), + [327] = {.entry = {.count = 1, .reusable = false}}, SHIFT(200), + [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [331] = {.entry = {.count = 1, .reusable = false}}, SHIFT(183), + [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_assignment_repeat1, 2, 0, 0), + [335] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_assignment_repeat1, 2, 0, 0), SHIFT_REPEAT(187), + [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [340] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_top_decl, 1, 0, 0), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_path, 1, 0, 0), + [348] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [350] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [352] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [354] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [356] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [358] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [360] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [362] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [364] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param_list, 3, 0, 0), + [366] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [368] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_args_list, 2, 0, 0), + [370] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_fields, 4, 0, 0), + [374] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), + [376] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_fields, 3, 0, 0), + [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_path, 6, 0, 0), + [380] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_import_path_repeat1, 2, 0, 0), + [382] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_import_path_repeat1, 2, 0, 0), SHIFT_REPEAT(144), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(169), + [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_args_list_repeat1, 2, 0, 0), + [391] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_args_list_repeat1, 2, 0, 0), SHIFT_REPEAT(39), + [394] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_substitution_args, 3, 0, 25), + [396] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [398] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [400] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [402] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [404] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_substitution_args, 4, 0, 26), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_args_list, 1, 0, 0), + [408] = {.entry = {.count = 1, .reusable = true}}, SHIFT(141), + [410] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_init_repeat1, 2, 0, 0), + [412] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_struct_init_repeat1, 2, 0, 0), SHIFT_REPEAT(169), + [415] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_substitution_args_repeat1, 2, 0, 29), + [417] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_substitution_args_repeat1, 2, 0, 29), SHIFT_REPEAT(171), + [420] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_param_list_repeat1, 2, 0, 0), + [422] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_param_list_repeat1, 2, 0, 0), SHIFT_REPEAT(207), + [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_struct_fields, 5, 0, 0), + [427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_fields_repeat1, 2, 0, 0), + [429] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_struct_fields_repeat1, 2, 0, 0), SHIFT_REPEAT(153), + [432] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_path, 3, 0, 0), + [434] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_path, 5, 0, 0), + [436] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param_list, 4, 0, 0), + [438] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [440] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_param_list_repeat1, 4, 0, 0), + [442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_fields_repeat1, 4, 0, 0), + [444] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_fields_repeat1, 5, 0, 0), + [446] = {.entry = {.count = 1, .reusable = false}}, SHIFT(188), + [448] = {.entry = {.count = 1, .reusable = false}}, SHIFT(186), + [450] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_struct_init_repeat1, 4, 0, 0), + [452] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_substitution_args_repeat1, 4, 0, 30), + [454] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [456] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), + [458] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [460] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [462] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [464] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [466] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [468] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [470] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [472] = {.entry = {.count = 1, .reusable = true}}, SHIFT(176), + [474] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bracket_args, 1, 0, 0), + [476] = {.entry = {.count = 1, .reusable = true}}, SHIFT(179), + [478] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [480] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [482] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [484] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [486] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [488] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [490] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [492] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [494] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [496] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [498] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [500] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [502] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [504] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [506] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), + [508] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [510] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [512] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [514] = {.entry = {.count = 1, .reusable = true}}, SHIFT(180), + [516] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [518] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [522] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [524] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [526] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [528] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [530] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [532] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [536] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), + [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(143), + [546] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(177), +}; + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) +#endif + +TS_PUBLIC const TSLanguage *tree_sitter_mathic(void) { + static const TSLanguage language = { + .abi_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, + .supertype_count = SUPERTYPE_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, + .supertype_map_slices = ts_supertype_map_slices, + .supertype_map_entries = ts_supertype_map_entries, + .supertype_symbols = ts_supertype_symbols, + .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 = (const void*)ts_lex_modes, + .lex_fn = ts_lex, + .keyword_lex_fn = ts_lex_keywords, + .keyword_capture_token = sym_IDENT, + .primary_state_ids = ts_primary_state_ids, + .name = "mathic", + .max_reserved_word_set_size = 0, + .metadata = { + .major_version = 0, + .minor_version = 1, + .patch_version = 0, + }, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/features/tree-sitter-mathic/src/tree_sitter/alloc.h b/features/tree-sitter-mathic/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1abdd12 --- /dev/null +++ b/features/tree-sitter-mathic/src/tree_sitter/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t size); +extern void *(*ts_current_calloc)(size_t count, size_t size); +extern void *(*ts_current_realloc)(void *ptr, size_t size); +extern void (*ts_current_free)(void *ptr); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/features/tree-sitter-mathic/src/tree_sitter/array.h b/features/tree-sitter-mathic/src/tree_sitter/array.h new file mode 100644 index 0000000..56fc8cd --- /dev/null +++ b/features/tree-sitter-mathic/src/tree_sitter/array.h @@ -0,0 +1,330 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./alloc.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +/// Initialize an array. +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +/// Create an empty array. +#define array_new() \ + { NULL, 0, 0 } + +/// Get a pointer to the element at a given `index` in the array. +#define array_get(self, _index) \ + (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) + +/// Get a pointer to the first element in the array. +#define array_front(self) array_get(self, 0) + +/// Get a pointer to the last element in the array. +#define array_back(self) array_get(self, (self)->size - 1) + +/// Clear the array, setting its size to zero. Note that this does not free any +/// memory allocated for the array's contents. +#define array_clear(self) ((self)->size = 0) + +/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is +/// less than the array's current capacity, this function has no effect. +#define array_reserve(self, new_capacity) \ + ((self)->contents = _array__reserve( \ + (void *)(self)->contents, &(self)->capacity, \ + array_elem_size(self), new_capacity) \ + ) + +/// Free any memory allocated for this array. Note that this does not free any +/// memory allocated for the array's contents. +#define array_delete(self) \ + do { \ + if ((self)->contents) ts_free((self)->contents); \ + (self)->contents = NULL; \ + (self)->size = 0; \ + (self)->capacity = 0; \ + } while (0) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + do { \ + (self)->contents = _array__grow( \ + (void *)(self)->contents, (self)->size, &(self)->capacity, \ + 1, array_elem_size(self) \ + ); \ + (self)->contents[(self)->size++] = (element); \ + } while(0) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + (self)->contents = _array__grow( \ + (self)->contents, (self)->size, &(self)->capacity, \ + count, array_elem_size(self) \ + ); \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ + (self)->size += (count); \ + } while (0) + +/// Append all elements from one array to the end of another. +#define array_push_all(self, other) \ + array_extend((self), (other)->size, (other)->contents) + +/// Append `count` elements to the end of the array, reading their values from the +/// `contents` pointer. +#define array_extend(self, count, other_contents) \ + (self)->contents = _array__splice( \ + (void*)(self)->contents, &(self)->size, &(self)->capacity, \ + array_elem_size(self), (self)->size, 0, count, other_contents \ + ) + +/// Remove `old_count` elements from the array starting at the given `index`. At +/// the same index, insert `new_count` new elements, reading their values from the +/// `new_contents` pointer. +#define array_splice(self, _index, old_count, new_count, new_contents) \ + (self)->contents = _array__splice( \ + (void *)(self)->contents, &(self)->size, &(self)->capacity, \ + array_elem_size(self), _index, old_count, new_count, new_contents \ + ) + +/// Insert one `element` into the array at the given `index`. +#define array_insert(self, _index, element) \ + (self)->contents = _array__splice( \ + (void *)(self)->contents, &(self)->size, &(self)->capacity, \ + array_elem_size(self), _index, 0, 1, &(element) \ + ) + +/// Remove one element from the array at the given `index`. +#define array_erase(self, _index) \ + _array__erase((void *)(self)->contents, &(self)->size, array_elem_size(self), _index) + +/// Pop the last element off the array, returning the element by value. +#define array_pop(self) ((self)->contents[--(self)->size]) + +/// Assign the contents of one array to another, reallocating if necessary. +#define array_assign(self, other) \ + (self)->contents = _array__assign( \ + (void *)(self)->contents, &(self)->size, &(self)->capacity, \ + (const void *)(other)->contents, (other)->size, array_elem_size(self) \ + ) + +/// Swap one array with another +#define array_swap(self, other) \ + do { \ + void *_array_swap_tmp = (void *)(self)->contents; \ + (self)->contents = (other)->contents; \ + (other)->contents = _array_swap_tmp; \ + _array__swap(&(self)->size, &(self)->capacity, \ + &(other)->size, &(other)->capacity); \ + } while (0) + +/// Get the size of the array contents +#define array_elem_size(self) (sizeof *(self)->contents) + +/// Search a sorted array for a given `needle` value, using the given `compare` +/// callback to determine the order. +/// +/// If an existing element is found to be equal to `needle`, then the `index` +/// out-parameter is set to the existing value's index, and the `exists` +/// out-parameter is set to true. Otherwise, `index` is set to an index where +/// `needle` should be inserted in order to preserve the sorting, and `exists` +/// is set to false. +#define array_search_sorted_with(self, compare, needle, _index, _exists) \ + _array__search_sorted(self, 0, compare, , needle, _index, _exists) + +/// Search a sorted array for a given `needle` value, using integer comparisons +/// of a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_with`. +#define array_search_sorted_by(self, field, needle, _index, _exists) \ + _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) + +/// Insert a given `value` into a sorted array, using the given `compare` +/// callback to determine the order. +#define array_insert_sorted_with(self, compare, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +/// Insert a given `value` into a sorted array, using integer comparisons of +/// a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_by`. +#define array_insert_sorted_by(self, field, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +// Private + +// Pointers to individual `Array` fields (rather than the entire `Array` itself) +// are passed to the various `_array__*` functions below to address strict aliasing +// violations that arises when the _entire_ `Array` struct is passed as `Array(void)*`. +// +// The `Array` type itself was not altered as a solution in order to avoid breakage +// with existing consumers (in particular, parsers with external scanners). + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(void* self_contents, uint32_t *size, + size_t element_size, uint32_t index) { + assert(index < *size); + char *contents = (char *)self_contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (*size - index - 1) * element_size); + (*size)--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void *_array__reserve(void *contents, uint32_t *capacity, + size_t element_size, uint32_t new_capacity) { + void *new_contents = contents; + if (new_capacity > *capacity) { + if (contents) { + new_contents = ts_realloc(contents, new_capacity * element_size); + } else { + new_contents = ts_malloc(new_capacity * element_size); + } + *capacity = new_capacity; + } + return new_contents; +} + +/// This is not what you're looking for, see `array_assign`. +static inline void *_array__assign(void* self_contents, uint32_t *self_size, uint32_t *self_capacity, + const void *other_contents, uint32_t other_size, size_t element_size) { + void *new_contents = _array__reserve(self_contents, self_capacity, element_size, other_size); + *self_size = other_size; + memcpy(new_contents, other_contents, *self_size * element_size); + return new_contents; +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(uint32_t *self_size, uint32_t *self_capacity, + uint32_t *other_size, uint32_t *other_capacity) { + uint32_t tmp_size = *self_size; + uint32_t tmp_capacity = *self_capacity; + *self_size = *other_size; + *self_capacity = *other_capacity; + *other_size = tmp_size; + *other_capacity = tmp_capacity; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void *_array__grow(void *contents, uint32_t size, uint32_t *capacity, + uint32_t count, size_t element_size) { + void *new_contents = contents; + uint32_t new_size = size + count; + if (new_size > *capacity) { + uint32_t new_capacity = *capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + new_contents = _array__reserve(contents, capacity, element_size, new_capacity); + } + return new_contents; +} + +/// This is not what you're looking for, see `array_splice`. +static inline void *_array__splice(void *self_contents, uint32_t *size, uint32_t *capacity, + size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = *size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= *size); + + void *new_contents = _array__reserve(self_contents, capacity, element_size, new_size); + + char *contents = (char *)new_contents; + if (*size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (*size - old_end) * element_size + ); + } + if (new_count > 0) { + if (elements) { + memcpy( + (contents + index * element_size), + elements, + new_count * element_size + ); + } else { + memset( + (contents + index * element_size), + 0, + new_count * element_size + ); + } + } + *size += new_count - old_count; + + return new_contents; +} + +/// A binary search routine, based on Rust's `std::slice::binary_search_by`. +/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. +#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ + do { \ + *(_index) = start; \ + *(_exists) = false; \ + uint32_t size = (self)->size - *(_index); \ + if (size == 0) break; \ + int comparison; \ + while (size > 1) { \ + uint32_t half_size = size / 2; \ + uint32_t mid_index = *(_index) + half_size; \ + comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ + if (comparison <= 0) *(_index) = mid_index; \ + size -= half_size; \ + } \ + comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ + if (comparison == 0) *(_exists) = true; \ + else if (comparison < 0) *(_index) += 1; \ + } while (0) + +/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) +/// parameter by reference in order to work with the generic sorting function above. +#define _compare_int(a, b) ((int)*(a) - (int)(b)) + +#ifdef _MSC_VER +#pragma warning(pop) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/features/tree-sitter-mathic/src/tree_sitter/parser.h b/features/tree-sitter-mathic/src/tree_sitter/parser.h new file mode 100644 index 0000000..858107d --- /dev/null +++ b/features/tree-sitter-mathic/src/tree_sitter/parser.h @@ -0,0 +1,286 @@ +#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; +typedef struct TSLanguageMetadata { + uint8_t major_version; + uint8_t minor_version; + uint8_t patch_version; +} TSLanguageMetadata; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +// Used to index the field and supertype maps. +typedef struct { + uint16_t index; + uint16_t length; +} TSMapSlice; + +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 *); + void (*log)(const TSLexer *, const char *, ...); +}; + +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 struct { + uint16_t lex_state; + uint16_t external_lex_state; + uint16_t reserved_word_set_id; +} TSLexerMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + +struct TSLanguage { + uint32_t abi_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 TSMapSlice *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 TSLexerMode *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; + const char *name; + const TSSymbol *reserved_words; + uint16_t max_reserved_word_set_size; + uint32_t supertype_count; + const TSSymbol *supertype_symbols; + const TSMapSlice *supertype_map_slices; + const TSSymbol *supertype_map_entries; + TSLanguageMetadata metadata; +}; + +static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { + uint32_t index = 0; + uint32_t size = len - index; + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = index + half_size; + const TSCharacterRange *range = &ranges[mid_index]; + if (lookahead >= range->start && lookahead <= range->end) { + return true; + } else if (lookahead > range->end) { + index = mid_index; + } + size -= half_size; + } + const TSCharacterRange *range = &ranges[index]; + return (lookahead >= range->start && lookahead <= range->end); +} + +/* + * Lexer Macros + */ + +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + UNUSED \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define ADVANCE_MAP(...) \ + { \ + static const uint16_t map[] = { __VA_ARGS__ }; \ + for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ + if (map[i] == lookahead) { \ + state = map[i + 1]; \ + 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_name, children, precedence, prod_id) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_name, \ + .child_count = children, \ + .dynamic_precedence = precedence, \ + .production_id = prod_id \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/features/tree-sitter-mathic/tree-sitter.json b/features/tree-sitter-mathic/tree-sitter.json new file mode 100644 index 0000000..8686ec1 --- /dev/null +++ b/features/tree-sitter-mathic/tree-sitter.json @@ -0,0 +1,43 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/config.schema.json", + "grammars": [ + { + "name": "mathic", + "camelcase": "Mathic", + "title": "Mathic", + "scope": "source.mth", + "file-types": [ + "mth" + ], + "highlights": ["queries/highlights.scm"], + "injection-regex": "^mathic$", + "class-name": "TreeSitterMathic" + } + ], + "metadata": { + "version": "0.1.0", + "license": "Apache", + "description": "tree-sitter for Mathic's grammar", + "authors": [ + { + "name": "Franco Giachetta", + "email": "francogiachetta27@gmail.com", + "url": "" + } + ], + "links": { + "repository": "https://github.com/FrancoGiachetta/mathic", + "funding": "" + } + }, + "bindings": { + "c": true, + "go": true, + "java": false, + "node": true, + "python": true, + "rust": true, + "swift": true, + "zig": false + } +} diff --git a/grammar.ebnf b/grammar.ebnf index 2d69e80..e0d68d9 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -51,12 +51,12 @@ stmt = declaration | expr_stmt | block ; -for_stmt = 'for' IDENT 'in' expr_no_init - ( '..' expr_no_init block +for_stmt = 'for' IDENT 'in' expr_no_assign + ( '..' expr_no_assign block | block ) ; -while_stmt = 'while' expr_no_init block ; -if_stmt = 'if' expr_no_init block [ 'else' block ] ; +while_stmt = 'while' expr_no_assign block ; +if_stmt = 'if' expr_no_assign block [ 'else' block ] ; return_stmt = 'return' expr ';' ; expr_stmt = expr ';' ; block = '{' { stmt } '}' ; @@ -79,8 +79,8 @@ expr = assignment ; assignment = IDENT { '.' IDENT } '=' expr | initializer ; -initializer = expr_no_init [ struct_init ] ; -expr_no_init = logical_or ; +initializer = expr_no_assign [ struct_init ] ; +expr_no_assign = logical_or ; logical_or = logical_and { 'or' logical_and } ; logical_and = equality { 'and' equality } ; equality = comparison { ( '==' | '!=' ) comparison } ; @@ -90,12 +90,12 @@ factor = unary { ( '*' | '/' ) unary } ; unary = ( '!' | '-' ) unary | call ; -call = primary { '(' [ arg_list ] ')' | '.' IDENT +call = primary { '(' [ args_list ] ')' | '.' IDENT | '[' bracket_args ']' } ; -bracket_args = substitution ; +bracket_args = substitution_args ; struct_init = '{' IDENT ':' expr { ',' IDENT ':' expr } '}' ; -substitution = IDENT '=' expr { ',' IDENT '=' expr } ; -primary = 'true' | 'false' | path | INT | FLOAT | STRING | '(' expr ')' ; +substitution_args = IDENT '=' expr { ',' IDENT '=' expr } ; +primary = 'true' | 'false' | path | NUM | STRING | '(' expr ')' ; (* ================================================================ *) @@ -104,17 +104,16 @@ primary = 'true' | 'false' | path | INT | FLOAT | STRING | '(' expr ')' ; param_list = ( IDENT ':' type ) { ',' ( IDENT ':' type ) } ; struct_fields = [ 'pub' ] IDENT ':' type { ',' [ 'pub' ] IDENT ':' type } ; -arg_list = expr { ',' expr } ; +args_list = expr { ',' expr } ; import_path = IDENT [ '::' ( import_path | '*' | '{' import_path { ',' import_path } '}' ) ] ; path = IDENT { '::' IDENT } ; -type = path { '<' IDENT '>' } ; +type = path [ '<' IDENT '>' ] ; (* ---- Terminal token classes ---- *) (* IDENT : [a-zA-Z_][a-zA-Z0-9_]* *) -(* INT : '0' | [1-9] [0-9]* *) -(* FLOAT : [0-9]+ '.' [0-9]+ *) +(* NUM : 0 | [1-9]\d*(\.\d+)? *) (* STRING : '"' [^"]* '"' *)