diff --git a/spec.md b/spec.md index 5e307d7..e92c448 100644 --- a/spec.md +++ b/spec.md @@ -3,6 +3,9 @@ - put in `TODO`s into the specification for things that should be re-visited in the future +TODO: t Await type wtih special unify + + # Goals - functional programming: everything is pure, and only a function - easy to learn, even as first programming language @@ -653,4 +656,4 @@ def [a] RUNTIME_EVAL(io: IO[a]) -> a { def RUNTIME_ENTRY() { RUNTIME_EVAL ( main() ) } -``` \ No newline at end of file +``` diff --git a/tree-sitter/.editorconfig b/tree-sitter/.editorconfig new file mode 100644 index 0000000..65330c4 --- /dev/null +++ b/tree-sitter/.editorconfig @@ -0,0 +1,46 @@ +root = true + +[*] +charset = utf-8 + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +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 + +[*.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/tree-sitter/.gitattributes b/tree-sitter/.gitattributes new file mode 100644 index 0000000..7772c94 --- /dev/null +++ b/tree-sitter/.gitattributes @@ -0,0 +1,42 @@ +* 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 diff --git a/tree-sitter/.gitignore b/tree-sitter/.gitignore new file mode 100644 index 0000000..87a0c80 --- /dev/null +++ b/tree-sitter/.gitignore @@ -0,0 +1,50 @@ +# Rust artifacts +target/ +Cargo.lock + +# Node artifacts +build/ +prebuilds/ +node_modules/ +package-lock.json + +# Swift artifacts +.build/ +Package.resolved + +# 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 diff --git a/tree-sitter/CMakeLists.txt b/tree-sitter/CMakeLists.txt new file mode 100644 index 0000000..1fde66a --- /dev/null +++ b/tree-sitter/CMakeLists.txt @@ -0,0 +1,66 @@ +cmake_minimum_required(VERSION 3.13) + +project(tree-sitter-crepuscular + VERSION "0.1.0" + DESCRIPTION "Parser for the Crepuscular(ray) functional programming language" + HOMEPAGE_URL "https://gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang" + 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/parser.c" + 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-crepuscular src/parser.c) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) + target_sources(tree-sitter-crepuscular PRIVATE src/scanner.c) +endif() +target_include_directories(tree-sitter-crepuscular + PRIVATE src + INTERFACE $ + $) + +target_compile_definitions(tree-sitter-crepuscular PRIVATE + $<$:TREE_SITTER_REUSE_ALLOCATOR> + $<$:TREE_SITTER_DEBUG>) + +set_target_properties(tree-sitter-crepuscular + PROPERTIES + C_STANDARD 11 + POSITION_INDEPENDENT_CODE ON + SOVERSION "${TREE_SITTER_ABI_VERSION}.${PROJECT_VERSION_MAJOR}" + DEFINE_SYMBOL "") + +configure_file(bindings/c/tree-sitter-crepuscular.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-crepuscular.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-crepuscular.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +install(TARGETS tree-sitter-crepuscular + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +file(GLOB QUERIES queries/*.scm) +install(FILES ${QUERIES} + DESTINATION "${CMAKE_INSTALL_DATADIR}/tree-sitter/queries/crepuscular") + +add_custom_target(ts-test "${TREE_SITTER_CLI}" test + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "tree-sitter test") diff --git a/tree-sitter/Cargo.toml b/tree-sitter/Cargo.toml new file mode 100644 index 0000000..e24d2bd --- /dev/null +++ b/tree-sitter/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "tree-sitter-crepuscular" +description = "Parser for the Crepuscular(ray) functional programming language" +version = "0.1.0" +authors = ["Alexander Nutz "] +license = "MIT" +readme = "README.md" +keywords = ["incremental", "parsing", "tree-sitter", "crepuscular"] +categories = ["parser-implementations", "parsing", "text-editors"] +repository = "https://gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang" +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.25.8" diff --git a/tree-sitter/Makefile b/tree-sitter/Makefile new file mode 100644 index 0000000..9f78247 --- /dev/null +++ b/tree-sitter/Makefile @@ -0,0 +1,99 @@ +ifeq ($(OS),Windows_NT) +$(error Windows is not supported) +endif + +LANGUAGE_NAME := tree-sitter-crepuscular +HOMEPAGE_URL := https://gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang +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 +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 +ifeq ($(shell uname),Darwin) + 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 + SOEXT = so + SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) + SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED = -shared -Wl,-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) +endif +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +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 + +$(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)|' $< > $@ + +$(PARSER): $(SRC_DIR)/grammar.json + $(TS) generate $^ + +install: all + install -d '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/crepuscular '$(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) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) +ifneq ($(wildcard queries/*.scm),) + install -m644 queries/*.scm '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/crepuscular +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/crepuscular + +clean: + $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) + +test: + $(TS) test + +.PHONY: all install uninstall clean test diff --git a/tree-sitter/Package.swift b/tree-sitter/Package.swift new file mode 100644 index 0000000..a1d0341 --- /dev/null +++ b/tree-sitter/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: "TreeSitterCrepuscular", + products: [ + .library(name: "TreeSitterCrepuscular", targets: ["TreeSitterCrepuscular"]), + ], + dependencies: [ + .package(name: "SwiftTreeSitter", url: "https://github.com/tree-sitter/swift-tree-sitter", from: "0.9.0"), + ], + targets: [ + .target( + name: "TreeSitterCrepuscular", + dependencies: [], + path: ".", + sources: sources, + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")] + ), + .testTarget( + name: "TreeSitterCrepuscularTests", + dependencies: [ + "SwiftTreeSitter", + "TreeSitterCrepuscular", + ], + path: "bindings/swift/TreeSitterCrepuscularTests" + ) + ], + cLanguageStandard: .c11 +) diff --git a/tree-sitter/binding.gyp b/tree-sitter/binding.gyp new file mode 100644 index 0000000..97e463c --- /dev/null +++ b/tree-sitter/binding.gyp @@ -0,0 +1,35 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_crepuscular_binding", + "dependencies": [ + " + +typedef struct TSLanguage TSLanguage; + +extern "C" TSLanguage *tree_sitter_crepuscular(); + +// "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_crepuscular()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; +} + +NODE_API_MODULE(tree_sitter_crepuscular_binding, Init) diff --git a/tree-sitter/bindings/node/binding_test.js b/tree-sitter/bindings/node/binding_test.js new file mode 100644 index 0000000..55becac --- /dev/null +++ b/tree-sitter/bindings/node/binding_test.js @@ -0,0 +1,9 @@ +const assert = require("node:assert"); +const { test } = require("node:test"); + +const Parser = require("tree-sitter"); + +test("can load grammar", () => { + const parser = new Parser(); + assert.doesNotThrow(() => parser.setLanguage(require("."))); +}); diff --git a/tree-sitter/bindings/node/index.d.ts b/tree-sitter/bindings/node/index.d.ts new file mode 100644 index 0000000..528e060 --- /dev/null +++ b/tree-sitter/bindings/node/index.d.ts @@ -0,0 +1,27 @@ +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[]; + }); + +type Language = { + language: unknown; + nodeTypeInfo: NodeInfo[]; +}; + +declare const language: Language; +export = language; diff --git a/tree-sitter/bindings/node/index.js b/tree-sitter/bindings/node/index.js new file mode 100644 index 0000000..f70ad09 --- /dev/null +++ b/tree-sitter/bindings/node/index.js @@ -0,0 +1,11 @@ +const root = require("path").join(__dirname, "..", ".."); + +module.exports = + typeof process.versions.bun === "string" + // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time + ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-crepuscular.node`) + : require("node-gyp-build")(root); + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/tree-sitter/bindings/python/tests/test_binding.py b/tree-sitter/bindings/python/tests/test_binding.py new file mode 100644 index 0000000..d321c9a --- /dev/null +++ b/tree-sitter/bindings/python/tests/test_binding.py @@ -0,0 +1,12 @@ +from unittest import TestCase + +import tree_sitter +import tree_sitter_crepuscular + + +class TestLanguage(TestCase): + def test_can_load_grammar(self): + try: + tree_sitter.Language(tree_sitter_crepuscular.language()) + except Exception: + self.fail("Error loading Crepuscular grammar") diff --git a/tree-sitter/bindings/python/tree_sitter_crepuscular/__init__.py b/tree-sitter/bindings/python/tree_sitter_crepuscular/__init__.py new file mode 100644 index 0000000..d3e1257 --- /dev/null +++ b/tree-sitter/bindings/python/tree_sitter_crepuscular/__init__.py @@ -0,0 +1,42 @@ +"""Parser for the Crepuscular(ray) functional programming language""" + +from importlib.resources import files as _files + +from ._binding import language + + +def _get_query(name, file): + query = _files(f"{__package__}.queries") / file + globals()[name] = query.read_text() + return globals()[name] + + +def __getattr__(name): + # NOTE: uncomment these to include any queries that this grammar contains: + + # if name == "HIGHLIGHTS_QUERY": + # return _get_query("HIGHLIGHTS_QUERY", "highlights.scm") + # if name == "INJECTIONS_QUERY": + # return _get_query("INJECTIONS_QUERY", "injections.scm") + # if name == "LOCALS_QUERY": + # return _get_query("LOCALS_QUERY", "locals.scm") + # if name == "TAGS_QUERY": + # return _get_query("TAGS_QUERY", "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/tree-sitter/bindings/python/tree_sitter_crepuscular/__init__.pyi b/tree-sitter/bindings/python/tree_sitter_crepuscular/__init__.pyi new file mode 100644 index 0000000..abf6633 --- /dev/null +++ b/tree-sitter/bindings/python/tree_sitter_crepuscular/__init__.pyi @@ -0,0 +1,10 @@ +from typing import Final + +# NOTE: uncomment these to include any queries that this grammar contains: + +# HIGHLIGHTS_QUERY: Final[str] +# INJECTIONS_QUERY: Final[str] +# LOCALS_QUERY: Final[str] +# TAGS_QUERY: Final[str] + +def language() -> object: ... diff --git a/tree-sitter/bindings/python/tree_sitter_crepuscular/binding.c b/tree-sitter/bindings/python/tree_sitter_crepuscular/binding.c new file mode 100644 index 0000000..eab690f --- /dev/null +++ b/tree-sitter/bindings/python/tree_sitter_crepuscular/binding.c @@ -0,0 +1,35 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_crepuscular(void); + +static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { + return PyCapsule_New(tree_sitter_crepuscular(), "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/tree-sitter/bindings/python/tree_sitter_crepuscular/py.typed b/tree-sitter/bindings/python/tree_sitter_crepuscular/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/tree-sitter/bindings/rust/build.rs b/tree-sitter/bindings/rust/build.rs new file mode 100644 index 0000000..0d7ab6c --- /dev/null +++ b/tree-sitter/bindings/rust/build.rs @@ -0,0 +1,21 @@ +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"); + + 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-crepuscular"); +} diff --git a/tree-sitter/bindings/rust/lib.rs b/tree-sitter/bindings/rust/lib.rs new file mode 100644 index 0000000..08fa1bf --- /dev/null +++ b/tree-sitter/bindings/rust/lib.rs @@ -0,0 +1,51 @@ +//! This crate provides Crepuscular 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_crepuscular::LANGUAGE; +//! parser +//! .set_language(&language.into()) +//! .expect("Error loading Crepuscular parser"); +//! let tree = parser.parse(code, None).unwrap(); +//! assert!(!tree.root_node().has_error()); +//! ``` +//! +//! [`Parser`]: https://docs.rs/tree-sitter/0.25.8/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter_language::LanguageFn; + +extern "C" { + fn tree_sitter_crepuscular() -> *const (); +} + +/// The tree-sitter [`LanguageFn`] for this grammar. +pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_crepuscular) }; + +/// 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"); + +// NOTE: uncomment these to include any queries that this grammar contains: + +// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); +// 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 Crepuscular parser"); + } +} diff --git a/tree-sitter/bindings/swift/TreeSitterCrepuscular/crepuscular.h b/tree-sitter/bindings/swift/TreeSitterCrepuscular/crepuscular.h new file mode 100644 index 0000000..70547e0 --- /dev/null +++ b/tree-sitter/bindings/swift/TreeSitterCrepuscular/crepuscular.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_CREPUSCULAR_H_ +#define TREE_SITTER_CREPUSCULAR_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_crepuscular(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_CREPUSCULAR_H_ diff --git a/tree-sitter/bindings/swift/TreeSitterCrepuscularTests/TreeSitterCrepuscularTests.swift b/tree-sitter/bindings/swift/TreeSitterCrepuscularTests/TreeSitterCrepuscularTests.swift new file mode 100644 index 0000000..efa4dc2 --- /dev/null +++ b/tree-sitter/bindings/swift/TreeSitterCrepuscularTests/TreeSitterCrepuscularTests.swift @@ -0,0 +1,12 @@ +import XCTest +import SwiftTreeSitter +import TreeSitterCrepuscular + +final class TreeSitterCrepuscularTests: XCTestCase { + func testCanLoadGrammar() throws { + let parser = Parser() + let language = Language(language: tree_sitter_crepuscular()) + XCTAssertNoThrow(try parser.setLanguage(language), + "Error loading Crepuscular grammar") + } +} diff --git a/tree-sitter/example.crr b/tree-sitter/example.crr new file mode 100644 index 0000000..f664d89 --- /dev/null +++ b/tree-sitter/example.crr @@ -0,0 +1,7 @@ +type t List = 'EOL | 'Cons {head: t, tail: t List} + +type List2 = with t: 'EOL | 'Cons {head: t, tail: t List} + +type List3 = with t: &a 'EOL | 'Cons {head: t, tail: a} + +type List4 = with t: &a 'EOL Unit | 'Cons {head: t, tail: a} diff --git a/tree-sitter/go.mod b/tree-sitter/go.mod new file mode 100644 index 0000000..bf27794 --- /dev/null +++ b/tree-sitter/go.mod @@ -0,0 +1,5 @@ +module gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang + +go 1.22 + +require github.com/tree-sitter/go-tree-sitter v0.24.0 diff --git a/tree-sitter/grammar.js b/tree-sitter/grammar.js new file mode 100644 index 0000000..5ec645a --- /dev/null +++ b/tree-sitter/grammar.js @@ -0,0 +1,241 @@ +/** + * @file Parser for the Crepuscular(ray) functional programming language + * @author Alexander Nutz + * @license MIT + */ + +/// +// @ts-check + +module.exports = grammar({ + name: "crepuscular", + + reserved: { + toplevel_kw: $ => + ['type', 'with', 'extensible', 'extend', 'union', 'def'], + }, + + extras: ($) => [ + /\s/, // whitespace + $.comment, + ], + + word: $ => $._identifier_tok, + + rules: { + source_file: $ => repeat($._definition), + + _identifier_tok: $ => token(/[a-zA-Z_]+[a-zA-Z0-9_]*/), + identifier: $ => reserved('toplevel_kw', $._identifier_tok), + path: $ => prec.left(seq($.identifier, repeat(seq('.', $.identifier)))), + + comment: $ => + token(seq("#", /.*/)), + + _definition: $ => choice( + $.full_partial_type_definition, + $.type_definition, + $.extensible_union, + $.extend_decl, + $.def, + ), + + extensible_union: $ => seq( + 'extensible', 'union', $.path), + + extend_decl: $ => seq( + 'extend', $.path, 'with', $.tag, $._type), + + full_partial_type_definition: $ => seq( + "type", + "?", $.path, + "=", + $._type + ), + + type_definition: $ => seq( + "type", + repeat($.identifier), + $.path, + "=", + $._type + ), + + _type_atom: $ => choice( + $.just_type, + $.partial_type, + seq('(', $._type, ')'), + $.record_type, + ), + + _type_non_fn: $ => choice( + $._type_atom, + $.tagged_type, + $.union_type, + $.partial_union_type, + $.parametrized_type, + $.with_type, + $.recursive_type, + ), + + _type: $ => choice( + $._type_non_fn, + $.fn_type, + ), + + union_type: $ => prec.left(1, + seq($._type, '|', $._type)), + + partial_union_type: $ => prec.left(1, + seq($._type, '|', '...', $.partial_type)), + + tag: $ => new RustRegex("'(?:[a-zA-Z_][a-zA-Z0-9_]*(?:[.][a-zA-Z_0-9]+)*)"), + tagged_type: $ => prec.right(3, + seq($.tag, optional( + choice( + $._type_atom, + $.parametrized_type)))), + + multi_type_parameters: $ => seq('[', $._type, repeat(seq(',', $._type)), ']'), + parametrized_type: $ => prec.left(4, seq( + choice( + $.multi_type_parameters, + $._type_atom + ), + repeat1($.path) + )), + + with_type: $ => seq('with', $.identifier, repeat(seq(',', $.identifier)), ':', $._type), + + recursive_type: $ => seq('&', $.identifier, $._type), + + partial_type: $ => seq('?', $.identifier), + + fn_type: $ => prec.left(-10, + seq($._type, '->', $._type)), + + just_type: $ => prec(-1, $.path), + + record_type_field: $ => seq($.identifier, ':', $._type), + record_type: $ => seq( + '{', + repeat(seq($.record_type_field, ',')), + optional(choice( + $.record_type_field, + seq('...', $.partial_type), + )), + '}'), + + escape_sequence: $ => + token.immediate( + seq('\\', /[tbrnf0"'\\]/)), + + char_middle: $ => /./, + string_middle: $ => /[^\\"]+/, + + char_literal: $ => + seq('\'', choice($.escape_sequence, $.char_middle), '\''), + + string_literal: $ => + seq('"', repeat(choice($.escape_sequence, $.string_middle)), '"'), + + num_literal: $ => + seq( + choice( + /[0-9]+/, + /\-[0-9]+/ + ), + optional(token.immediate(/[.][0-9]+/)) + ), + + list_expression: $ => + seq( + '[', + repeat(seq($.expression, ',')), + optional($.expression), + ']'), + + field_access: $ => prec.left( + seq($._atom, ':', $.identifier)), + + function_call: $ => prec.left(1, + seq($._atom, '(', + repeat(seq($.expression, ',')), optional($.expression), + ')')), + + ident_expr: $ => $.identifier, + + record_expr_field: $ => + seq($.identifier, ':', $.expression), + + record_expr: $ => seq( + '{', + repeat(seq($.record_expr_field, ',')), + optional($.record_expr_field), + '}'), + + _atom: $ => choice( + prec(0, seq('(', $.expression, ')')), + $.ident_expr, + $.char_literal, + $.string_literal, + $.num_literal, + $.list_expression, + $.field_access, + $.function_call, + $.record_expr, + // TODO + ), + + let_binding: $ => seq( + 'let', + $.identifier, + '=', + $.expression, + optional('in'), + $.expression, + ), + + await_binding: $ => seq( + 'await', + $.identifier, + '=', + $.expression, + optional('in'), + $.expression, + ), + + type_downcast: $ => seq( + $._atom, + '::', + $._type, + ), + + lambda: $ => prec.right(4, seq( + $.identifier, + optional(seq(':', $._type_non_fn)), + '->', + $.expression + )), + + expression: $ => choice( + $._atom, + $.let_binding, + $.await_binding, + $.type_downcast, + $.lambda, + // TODO + ), + + def: $ => seq( + 'def', $.path, + choice( + seq(':', $._type), + seq( + optional(seq(':', $._type)), + seq('=', $.expression), + ) + ), + ), + } +}); diff --git a/tree-sitter/package.json b/tree-sitter/package.json new file mode 100644 index 0000000..3c850f4 --- /dev/null +++ b/tree-sitter/package.json @@ -0,0 +1,52 @@ +{ + "name": "tree-sitter-crepuscular", + "version": "0.1.0", + "description": "Parser for the Crepuscular(ray) functional programming language", + "repository": "https://gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang", + "license": "MIT", + "author": { + "name": "Alexander Nutz", + "email": "alexander.nutz@vxcc.dev", + "url": "https://alex.vxcc.dev/" + }, + "main": "bindings/node", + "types": "bindings/node", + "keywords": [ + "incremental", + "parsing", + "tree-sitter", + "crepuscular" + ], + "files": [ + "grammar.js", + "tree-sitter.json", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**", + "*.wasm" + ], + "dependencies": { + "node-addon-api": "^8.3.1", + "node-gyp-build": "^4.8.4" + }, + "devDependencies": { + "prebuildify": "^6.0.1", + "tree-sitter-cli": "^0.25.8" + }, + "peerDependencies": { + "tree-sitter": "^0.22.4" + }, + "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" + } +} diff --git a/tree-sitter/pyproject.toml b/tree-sitter/pyproject.toml new file mode 100644 index 0000000..7f53f08 --- /dev/null +++ b/tree-sitter/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=62.4.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-crepuscular" +description = "Parser for the Crepuscular(ray) functional programming language" +version = "0.1.0" +keywords = ["incremental", "parsing", "tree-sitter", "crepuscular"] +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed", +] +authors = [{ name = "Alexander Nutz", email = "alexander.nutz@vxcc.dev" }] +requires-python = ">=3.10" +license.text = "MIT" +readme = "README.md" + +[project.urls] +Homepage = "https://gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang" + +[project.optional-dependencies] +core = ["tree-sitter~=0.24"] + +[tool.cibuildwheel] +build = "cp310-*" +build-frontend = "build" diff --git a/tree-sitter/setup.py b/tree-sitter/setup.py new file mode 100644 index 0000000..a2e5a34 --- /dev/null +++ b/tree-sitter/setup.py @@ -0,0 +1,77 @@ +from os import path +from platform import system +from sysconfig import get_config_var + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from setuptools.command.egg_info import egg_info +from wheel.bdist_wheel import bdist_wheel + +sources = [ + "bindings/python/tree_sitter_crepuscular/binding.c", + "src/parser.c", +] +if path.exists("src/scanner.c"): + sources.append("src/scanner.c") + +macros: list[tuple[str, str | None]] = [ + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), +] +if limited_api := not get_config_var("Py_GIL_DISABLED"): + macros.append(("Py_LIMITED_API", "0x030A0000")) + +if system() != "Windows": + cflags = ["-std=c11", "-fvisibility=hidden"] +else: + cflags = ["/std:c11", "/utf-8"] + + +class Build(build): + def run(self): + if path.isdir("queries"): + dest = path.join(self.build_lib, "tree_sitter_crepuscular", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp"): + 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_crepuscular": ["*.pyi", "py.typed"], + "tree_sitter_crepuscular.queries": ["*.scm"], + }, + ext_package="tree_sitter_crepuscular", + ext_modules=[ + Extension( + name="_binding", + sources=sources, + extra_compile_args=cflags, + define_macros=macros, + include_dirs=["src"], + py_limited_api=limited_api, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel, + "egg_info": EggInfo, + }, + zip_safe=False +) diff --git a/tree-sitter/src/grammar.json b/tree-sitter/src/grammar.json new file mode 100644 index 0000000..91a72e8 --- /dev/null +++ b/tree-sitter/src/grammar.json @@ -0,0 +1,1206 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", + "name": "crepuscular", + "word": "_identifier_tok", + "rules": { + "source_file": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_definition" + } + }, + "_identifier_tok": { + "type": "TOKEN", + "content": { + "type": "PATTERN", + "value": "[a-zA-Z_]+[a-zA-Z0-9_]*" + } + }, + "identifier": { + "type": "RESERVED", + "content": { + "type": "SYMBOL", + "name": "_identifier_tok" + }, + "context_name": "toplevel_kw" + }, + "path": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + } + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "PATTERN", + "value": ".*" + } + ] + } + }, + "_definition": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "full_partial_type_definition" + }, + { + "type": "SYMBOL", + "name": "type_definition" + }, + { + "type": "SYMBOL", + "name": "extensible_union" + }, + { + "type": "SYMBOL", + "name": "extend_decl" + }, + { + "type": "SYMBOL", + "name": "def" + } + ] + }, + "extensible_union": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "extensible" + }, + { + "type": "STRING", + "value": "union" + }, + { + "type": "SYMBOL", + "name": "path" + } + ] + }, + "extend_decl": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "extend" + }, + { + "type": "SYMBOL", + "name": "path" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "full_partial_type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "STRING", + "value": "?" + }, + { + "type": "SYMBOL", + "name": "path" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "SYMBOL", + "name": "path" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "_type_atom": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "just_type" + }, + { + "type": "SYMBOL", + "name": "partial_type" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "record_type" + } + ] + }, + "_type_non_fn": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_atom" + }, + { + "type": "SYMBOL", + "name": "tagged_type" + }, + { + "type": "SYMBOL", + "name": "union_type" + }, + { + "type": "SYMBOL", + "name": "partial_union_type" + }, + { + "type": "SYMBOL", + "name": "parametrized_type" + }, + { + "type": "SYMBOL", + "name": "with_type" + }, + { + "type": "SYMBOL", + "name": "recursive_type" + } + ] + }, + "_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_non_fn" + }, + { + "type": "SYMBOL", + "name": "fn_type" + } + ] + }, + "union_type": { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + "partial_union_type": { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "STRING", + "value": "..." + }, + { + "type": "SYMBOL", + "name": "partial_type" + } + ] + } + }, + "tag": { + "type": "PATTERN", + "value": "'(?:[a-zA-Z_][a-zA-Z0-9_]*(?:[.][a-zA-Z_0-9]+)*)" + }, + "tagged_type": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_atom" + }, + { + "type": "SYMBOL", + "name": "parametrized_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "multi_type_parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "parametrized_type": { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "multi_type_parameters" + }, + { + "type": "SYMBOL", + "name": "_type_atom" + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "path" + } + } + ] + } + }, + "with_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "recursive_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "partial_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "fn_type": { + "type": "PREC_LEFT", + "value": -10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + "just_type": { + "type": "PREC", + "value": -1, + "content": { + "type": "SYMBOL", + "name": "path" + } + }, + "record_type_field": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "record_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "record_type_field" + }, + { + "type": "STRING", + "value": "," + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "record_type_field" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "..." + }, + { + "type": "SYMBOL", + "name": "partial_type" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "escape_sequence": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "PATTERN", + "value": "[tbrnf0\"'\\\\]" + } + ] + } + }, + "char_middle": { + "type": "PATTERN", + "value": "." + }, + "string_middle": { + "type": "PATTERN", + "value": "[^\\\\\"]+" + }, + "char_literal": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "char_middle" + } + ] + }, + { + "type": "STRING", + "value": "'" + } + ] + }, + "string_literal": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "string_middle" + } + ] + } + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + "num_literal": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9]+" + }, + { + "type": "PATTERN", + "value": "\\-[0-9]+" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[.][0-9]+" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "list_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "," + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "field_access": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_atom" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + }, + "function_call": { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_atom" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "," + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "ident_expr": { + "type": "SYMBOL", + "name": "identifier" + }, + "record_expr_field": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "record_expr": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "record_expr_field" + }, + { + "type": "STRING", + "value": "," + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "record_expr_field" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_atom": { + "type": "CHOICE", + "members": [ + { + "type": "PREC", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "ident_expr" + }, + { + "type": "SYMBOL", + "name": "char_literal" + }, + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "SYMBOL", + "name": "num_literal" + }, + { + "type": "SYMBOL", + "name": "list_expression" + }, + { + "type": "SYMBOL", + "name": "field_access" + }, + { + "type": "SYMBOL", + "name": "function_call" + }, + { + "type": "SYMBOL", + "name": "record_expr" + } + ] + }, + "let_binding": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "in" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "await_binding": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "await" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "in" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "type_downcast": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_atom" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "lambda": { + "type": "PREC_RIGHT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type_non_fn" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + "expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_atom" + }, + { + "type": "SYMBOL", + "name": "let_binding" + }, + { + "type": "SYMBOL", + "name": "await_binding" + }, + { + "type": "SYMBOL", + "name": "type_downcast" + }, + { + "type": "SYMBOL", + "name": "lambda" + } + ] + }, + "def": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "def" + }, + { + "type": "SYMBOL", + "name": "path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + ] + } + ] + } + ] + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + }, + { + "type": "SYMBOL", + "name": "comment" + } + ], + "conflicts": [], + "precedences": [], + "externals": [], + "inline": [], + "supertypes": [], + "reserved": { + "toplevel_kw": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "STRING", + "value": "extensible" + }, + { + "type": "STRING", + "value": "extend" + }, + { + "type": "STRING", + "value": "union" + }, + { + "type": "STRING", + "value": "def" + } + ] + } +} \ No newline at end of file diff --git a/tree-sitter/src/node-types.json b/tree-sitter/src/node-types.json new file mode 100644 index 0000000..628ae51 --- /dev/null +++ b/tree-sitter/src/node-types.json @@ -0,0 +1,1414 @@ +[ + { + "type": "await_binding", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "char_literal", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "char_middle", + "named": true + }, + { + "type": "escape_sequence", + "named": true + } + ] + } + }, + { + "type": "def", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "await_binding", + "named": true + }, + { + "type": "char_literal", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "field_access", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "ident_expr", + "named": true + }, + { + "type": "lambda", + "named": true + }, + { + "type": "let_binding", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "num_literal", + "named": true + }, + { + "type": "record_expr", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "type_downcast", + "named": true + } + ] + } + }, + { + "type": "extend_decl", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "extensible_union", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "path", + "named": true + } + ] + } + }, + { + "type": "field_access", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "char_literal", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "field_access", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "ident_expr", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "num_literal", + "named": true + }, + { + "type": "record_expr", + "named": true + }, + { + "type": "string_literal", + "named": true + } + ] + } + }, + { + "type": "fn_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "full_partial_type_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "function_call", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "char_literal", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "field_access", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "ident_expr", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "num_literal", + "named": true + }, + { + "type": "record_expr", + "named": true + }, + { + "type": "string_literal", + "named": true + } + ] + } + }, + { + "type": "ident_expr", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "identifier", + "named": true, + "fields": {} + }, + { + "type": "just_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "path", + "named": true + } + ] + } + }, + { + "type": "lambda", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "fn_type", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "let_binding", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "list_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "multi_type_parameters", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "num_literal", + "named": true, + "fields": {} + }, + { + "type": "parametrized_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "multi_type_parameters", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "partial_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "partial_union_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "record_expr", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "record_expr_field", + "named": true + } + ] + } + }, + { + "type": "record_expr_field", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "record_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "partial_type", + "named": true + }, + { + "type": "record_type_field", + "named": true + } + ] + } + }, + { + "type": "record_type_field", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "recursive_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "source_file", + "named": true, + "root": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "def", + "named": true + }, + { + "type": "extend_decl", + "named": true + }, + { + "type": "extensible_union", + "named": true + }, + { + "type": "full_partial_type_definition", + "named": true + }, + { + "type": "type_definition", + "named": true + } + ] + } + }, + { + "type": "string_literal", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + }, + { + "type": "string_middle", + "named": true + } + ] + } + }, + { + "type": "tagged_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "type_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "path", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "type_downcast", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "char_literal", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "field_access", + "named": true + }, + { + "type": "fn_type", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "ident_expr", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "num_literal", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_expr", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "union_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "named": true + } + ] + } + }, + { + "type": "with_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "just_type", + "named": true + }, + { + "type": "parametrized_type", + "named": true + }, + { + "type": "partial_type", + "named": true + }, + { + "type": "partial_union_type", + "named": true + }, + { + "type": "record_type", + "named": true + }, + { + "type": "recursive_type", + "named": true + }, + { + "type": "tagged_type", + "named": true + }, + { + "type": "union_type", + "named": true + }, + { + "type": "with_type", + "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": "await", + "named": false + }, + { + "type": "char_middle", + "named": true + }, + { + "type": "comment", + "named": true, + "extra": true + }, + { + "type": "def", + "named": false + }, + { + "type": "escape_sequence", + "named": true + }, + { + "type": "extend", + "named": false + }, + { + "type": "extensible", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "let", + "named": false + }, + { + "type": "string_middle", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "type", + "named": false + }, + { + "type": "union", + "named": false + }, + { + "type": "with", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "}", + "named": false + } +] \ No newline at end of file diff --git a/tree-sitter/src/parser.c b/tree-sitter/src/parser.c new file mode 100644 index 0000000..fe26b9e --- /dev/null +++ b/tree-sitter/src/parser.c @@ -0,0 +1,8664 @@ +/* Automatically @generated by tree-sitter v0.25.8 */ + +#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 322 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 86 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 37 +#define EXTERNAL_TOKEN_COUNT 0 +#define FIELD_COUNT 0 +#define MAX_ALIAS_SEQUENCE_LENGTH 6 +#define MAX_RESERVED_WORD_SET_SIZE 6 +#define PRODUCTION_ID_COUNT 1 +#define SUPERTYPE_COUNT 0 + +enum ts_symbol_identifiers { + sym__identifier_tok = 1, + anon_sym_DOT = 2, + sym_comment = 3, + anon_sym_extensible = 4, + anon_sym_union = 5, + anon_sym_extend = 6, + anon_sym_with = 7, + anon_sym_type = 8, + anon_sym_QMARK = 9, + anon_sym_EQ = 10, + anon_sym_LPAREN = 11, + anon_sym_RPAREN = 12, + anon_sym_PIPE = 13, + anon_sym_DOT_DOT_DOT = 14, + sym_tag = 15, + anon_sym_LBRACK = 16, + anon_sym_COMMA = 17, + anon_sym_RBRACK = 18, + anon_sym_COLON = 19, + anon_sym_AMP = 20, + anon_sym_DASH_GT = 21, + anon_sym_LBRACE = 22, + anon_sym_RBRACE = 23, + sym_escape_sequence = 24, + sym_char_middle = 25, + sym_string_middle = 26, + anon_sym_SQUOTE = 27, + anon_sym_DQUOTE = 28, + aux_sym_num_literal_token1 = 29, + aux_sym_num_literal_token2 = 30, + aux_sym_num_literal_token3 = 31, + anon_sym_let = 32, + anon_sym_in = 33, + anon_sym_await = 34, + anon_sym_COLON_COLON = 35, + anon_sym_def = 36, + sym_source_file = 37, + sym_identifier = 38, + sym_path = 39, + sym__definition = 40, + sym_extensible_union = 41, + sym_extend_decl = 42, + sym_full_partial_type_definition = 43, + sym_type_definition = 44, + sym__type_atom = 45, + sym__type_non_fn = 46, + sym__type = 47, + sym_union_type = 48, + sym_partial_union_type = 49, + sym_tagged_type = 50, + sym_multi_type_parameters = 51, + sym_parametrized_type = 52, + sym_with_type = 53, + sym_recursive_type = 54, + sym_partial_type = 55, + sym_fn_type = 56, + sym_just_type = 57, + sym_record_type_field = 58, + sym_record_type = 59, + sym_char_literal = 60, + sym_string_literal = 61, + sym_num_literal = 62, + sym_list_expression = 63, + sym_field_access = 64, + sym_function_call = 65, + sym_ident_expr = 66, + sym_record_expr_field = 67, + sym_record_expr = 68, + sym__atom = 69, + sym_let_binding = 70, + sym_await_binding = 71, + sym_type_downcast = 72, + sym_lambda = 73, + sym_expression = 74, + sym_def = 75, + aux_sym_source_file_repeat1 = 76, + aux_sym_path_repeat1 = 77, + aux_sym_type_definition_repeat1 = 78, + aux_sym_multi_type_parameters_repeat1 = 79, + aux_sym_parametrized_type_repeat1 = 80, + aux_sym_with_type_repeat1 = 81, + aux_sym_record_type_repeat1 = 82, + aux_sym_string_literal_repeat1 = 83, + aux_sym_list_expression_repeat1 = 84, + aux_sym_record_expr_repeat1 = 85, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym__identifier_tok] = "_identifier_tok", + [anon_sym_DOT] = ".", + [sym_comment] = "comment", + [anon_sym_extensible] = "extensible", + [anon_sym_union] = "union", + [anon_sym_extend] = "extend", + [anon_sym_with] = "with", + [anon_sym_type] = "type", + [anon_sym_QMARK] = "\?", + [anon_sym_EQ] = "=", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_PIPE] = "|", + [anon_sym_DOT_DOT_DOT] = "...", + [sym_tag] = "tag", + [anon_sym_LBRACK] = "[", + [anon_sym_COMMA] = ",", + [anon_sym_RBRACK] = "]", + [anon_sym_COLON] = ":", + [anon_sym_AMP] = "&", + [anon_sym_DASH_GT] = "->", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [sym_escape_sequence] = "escape_sequence", + [sym_char_middle] = "char_middle", + [sym_string_middle] = "string_middle", + [anon_sym_SQUOTE] = "'", + [anon_sym_DQUOTE] = "\"", + [aux_sym_num_literal_token1] = "num_literal_token1", + [aux_sym_num_literal_token2] = "num_literal_token2", + [aux_sym_num_literal_token3] = "num_literal_token3", + [anon_sym_let] = "let", + [anon_sym_in] = "in", + [anon_sym_await] = "await", + [anon_sym_COLON_COLON] = "::", + [anon_sym_def] = "def", + [sym_source_file] = "source_file", + [sym_identifier] = "identifier", + [sym_path] = "path", + [sym__definition] = "_definition", + [sym_extensible_union] = "extensible_union", + [sym_extend_decl] = "extend_decl", + [sym_full_partial_type_definition] = "full_partial_type_definition", + [sym_type_definition] = "type_definition", + [sym__type_atom] = "_type_atom", + [sym__type_non_fn] = "_type_non_fn", + [sym__type] = "_type", + [sym_union_type] = "union_type", + [sym_partial_union_type] = "partial_union_type", + [sym_tagged_type] = "tagged_type", + [sym_multi_type_parameters] = "multi_type_parameters", + [sym_parametrized_type] = "parametrized_type", + [sym_with_type] = "with_type", + [sym_recursive_type] = "recursive_type", + [sym_partial_type] = "partial_type", + [sym_fn_type] = "fn_type", + [sym_just_type] = "just_type", + [sym_record_type_field] = "record_type_field", + [sym_record_type] = "record_type", + [sym_char_literal] = "char_literal", + [sym_string_literal] = "string_literal", + [sym_num_literal] = "num_literal", + [sym_list_expression] = "list_expression", + [sym_field_access] = "field_access", + [sym_function_call] = "function_call", + [sym_ident_expr] = "ident_expr", + [sym_record_expr_field] = "record_expr_field", + [sym_record_expr] = "record_expr", + [sym__atom] = "_atom", + [sym_let_binding] = "let_binding", + [sym_await_binding] = "await_binding", + [sym_type_downcast] = "type_downcast", + [sym_lambda] = "lambda", + [sym_expression] = "expression", + [sym_def] = "def", + [aux_sym_source_file_repeat1] = "source_file_repeat1", + [aux_sym_path_repeat1] = "path_repeat1", + [aux_sym_type_definition_repeat1] = "type_definition_repeat1", + [aux_sym_multi_type_parameters_repeat1] = "multi_type_parameters_repeat1", + [aux_sym_parametrized_type_repeat1] = "parametrized_type_repeat1", + [aux_sym_with_type_repeat1] = "with_type_repeat1", + [aux_sym_record_type_repeat1] = "record_type_repeat1", + [aux_sym_string_literal_repeat1] = "string_literal_repeat1", + [aux_sym_list_expression_repeat1] = "list_expression_repeat1", + [aux_sym_record_expr_repeat1] = "record_expr_repeat1", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym__identifier_tok] = sym__identifier_tok, + [anon_sym_DOT] = anon_sym_DOT, + [sym_comment] = sym_comment, + [anon_sym_extensible] = anon_sym_extensible, + [anon_sym_union] = anon_sym_union, + [anon_sym_extend] = anon_sym_extend, + [anon_sym_with] = anon_sym_with, + [anon_sym_type] = anon_sym_type, + [anon_sym_QMARK] = anon_sym_QMARK, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_DOT_DOT_DOT] = anon_sym_DOT_DOT_DOT, + [sym_tag] = sym_tag, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_AMP] = anon_sym_AMP, + [anon_sym_DASH_GT] = anon_sym_DASH_GT, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [sym_escape_sequence] = sym_escape_sequence, + [sym_char_middle] = sym_char_middle, + [sym_string_middle] = sym_string_middle, + [anon_sym_SQUOTE] = anon_sym_SQUOTE, + [anon_sym_DQUOTE] = anon_sym_DQUOTE, + [aux_sym_num_literal_token1] = aux_sym_num_literal_token1, + [aux_sym_num_literal_token2] = aux_sym_num_literal_token2, + [aux_sym_num_literal_token3] = aux_sym_num_literal_token3, + [anon_sym_let] = anon_sym_let, + [anon_sym_in] = anon_sym_in, + [anon_sym_await] = anon_sym_await, + [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, + [anon_sym_def] = anon_sym_def, + [sym_source_file] = sym_source_file, + [sym_identifier] = sym_identifier, + [sym_path] = sym_path, + [sym__definition] = sym__definition, + [sym_extensible_union] = sym_extensible_union, + [sym_extend_decl] = sym_extend_decl, + [sym_full_partial_type_definition] = sym_full_partial_type_definition, + [sym_type_definition] = sym_type_definition, + [sym__type_atom] = sym__type_atom, + [sym__type_non_fn] = sym__type_non_fn, + [sym__type] = sym__type, + [sym_union_type] = sym_union_type, + [sym_partial_union_type] = sym_partial_union_type, + [sym_tagged_type] = sym_tagged_type, + [sym_multi_type_parameters] = sym_multi_type_parameters, + [sym_parametrized_type] = sym_parametrized_type, + [sym_with_type] = sym_with_type, + [sym_recursive_type] = sym_recursive_type, + [sym_partial_type] = sym_partial_type, + [sym_fn_type] = sym_fn_type, + [sym_just_type] = sym_just_type, + [sym_record_type_field] = sym_record_type_field, + [sym_record_type] = sym_record_type, + [sym_char_literal] = sym_char_literal, + [sym_string_literal] = sym_string_literal, + [sym_num_literal] = sym_num_literal, + [sym_list_expression] = sym_list_expression, + [sym_field_access] = sym_field_access, + [sym_function_call] = sym_function_call, + [sym_ident_expr] = sym_ident_expr, + [sym_record_expr_field] = sym_record_expr_field, + [sym_record_expr] = sym_record_expr, + [sym__atom] = sym__atom, + [sym_let_binding] = sym_let_binding, + [sym_await_binding] = sym_await_binding, + [sym_type_downcast] = sym_type_downcast, + [sym_lambda] = sym_lambda, + [sym_expression] = sym_expression, + [sym_def] = sym_def, + [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, + [aux_sym_path_repeat1] = aux_sym_path_repeat1, + [aux_sym_type_definition_repeat1] = aux_sym_type_definition_repeat1, + [aux_sym_multi_type_parameters_repeat1] = aux_sym_multi_type_parameters_repeat1, + [aux_sym_parametrized_type_repeat1] = aux_sym_parametrized_type_repeat1, + [aux_sym_with_type_repeat1] = aux_sym_with_type_repeat1, + [aux_sym_record_type_repeat1] = aux_sym_record_type_repeat1, + [aux_sym_string_literal_repeat1] = aux_sym_string_literal_repeat1, + [aux_sym_list_expression_repeat1] = aux_sym_list_expression_repeat1, + [aux_sym_record_expr_repeat1] = aux_sym_record_expr_repeat1, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym__identifier_tok] = { + .visible = false, + .named = true, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [anon_sym_extensible] = { + .visible = true, + .named = false, + }, + [anon_sym_union] = { + .visible = true, + .named = false, + }, + [anon_sym_extend] = { + .visible = true, + .named = false, + }, + [anon_sym_with] = { + .visible = true, + .named = false, + }, + [anon_sym_type] = { + .visible = true, + .named = false, + }, + [anon_sym_QMARK] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT_DOT_DOT] = { + .visible = true, + .named = false, + }, + [sym_tag] = { + .visible = true, + .named = true, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [sym_escape_sequence] = { + .visible = true, + .named = true, + }, + [sym_char_middle] = { + .visible = true, + .named = true, + }, + [sym_string_middle] = { + .visible = true, + .named = true, + }, + [anon_sym_SQUOTE] = { + .visible = true, + .named = false, + }, + [anon_sym_DQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_num_literal_token1] = { + .visible = false, + .named = false, + }, + [aux_sym_num_literal_token2] = { + .visible = false, + .named = false, + }, + [aux_sym_num_literal_token3] = { + .visible = false, + .named = false, + }, + [anon_sym_let] = { + .visible = true, + .named = false, + }, + [anon_sym_in] = { + .visible = true, + .named = false, + }, + [anon_sym_await] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_def] = { + .visible = true, + .named = false, + }, + [sym_source_file] = { + .visible = true, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [sym_path] = { + .visible = true, + .named = true, + }, + [sym__definition] = { + .visible = false, + .named = true, + }, + [sym_extensible_union] = { + .visible = true, + .named = true, + }, + [sym_extend_decl] = { + .visible = true, + .named = true, + }, + [sym_full_partial_type_definition] = { + .visible = true, + .named = true, + }, + [sym_type_definition] = { + .visible = true, + .named = true, + }, + [sym__type_atom] = { + .visible = false, + .named = true, + }, + [sym__type_non_fn] = { + .visible = false, + .named = true, + }, + [sym__type] = { + .visible = false, + .named = true, + }, + [sym_union_type] = { + .visible = true, + .named = true, + }, + [sym_partial_union_type] = { + .visible = true, + .named = true, + }, + [sym_tagged_type] = { + .visible = true, + .named = true, + }, + [sym_multi_type_parameters] = { + .visible = true, + .named = true, + }, + [sym_parametrized_type] = { + .visible = true, + .named = true, + }, + [sym_with_type] = { + .visible = true, + .named = true, + }, + [sym_recursive_type] = { + .visible = true, + .named = true, + }, + [sym_partial_type] = { + .visible = true, + .named = true, + }, + [sym_fn_type] = { + .visible = true, + .named = true, + }, + [sym_just_type] = { + .visible = true, + .named = true, + }, + [sym_record_type_field] = { + .visible = true, + .named = true, + }, + [sym_record_type] = { + .visible = true, + .named = true, + }, + [sym_char_literal] = { + .visible = true, + .named = true, + }, + [sym_string_literal] = { + .visible = true, + .named = true, + }, + [sym_num_literal] = { + .visible = true, + .named = true, + }, + [sym_list_expression] = { + .visible = true, + .named = true, + }, + [sym_field_access] = { + .visible = true, + .named = true, + }, + [sym_function_call] = { + .visible = true, + .named = true, + }, + [sym_ident_expr] = { + .visible = true, + .named = true, + }, + [sym_record_expr_field] = { + .visible = true, + .named = true, + }, + [sym_record_expr] = { + .visible = true, + .named = true, + }, + [sym__atom] = { + .visible = false, + .named = true, + }, + [sym_let_binding] = { + .visible = true, + .named = true, + }, + [sym_await_binding] = { + .visible = true, + .named = true, + }, + [sym_type_downcast] = { + .visible = true, + .named = true, + }, + [sym_lambda] = { + .visible = true, + .named = true, + }, + [sym_expression] = { + .visible = true, + .named = true, + }, + [sym_def] = { + .visible = true, + .named = true, + }, + [aux_sym_source_file_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_path_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_type_definition_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_multi_type_parameters_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_parametrized_type_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_with_type_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_record_type_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_string_literal_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_list_expression_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_record_expr_repeat1] = { + .visible = false, + .named = false, + }, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 5, + [6] = 5, + [7] = 7, + [8] = 7, + [9] = 3, + [10] = 4, + [11] = 11, + [12] = 12, + [13] = 12, + [14] = 11, + [15] = 12, + [16] = 11, + [17] = 17, + [18] = 18, + [19] = 19, + [20] = 20, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 19, + [27] = 17, + [28] = 21, + [29] = 22, + [30] = 30, + [31] = 22, + [32] = 25, + [33] = 19, + [34] = 17, + [35] = 21, + [36] = 36, + [37] = 25, + [38] = 24, + [39] = 30, + [40] = 20, + [41] = 24, + [42] = 30, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 46, + [47] = 47, + [48] = 48, + [49] = 49, + [50] = 50, + [51] = 51, + [52] = 52, + [53] = 53, + [54] = 48, + [55] = 50, + [56] = 56, + [57] = 50, + [58] = 51, + [59] = 59, + [60] = 52, + [61] = 53, + [62] = 48, + [63] = 51, + [64] = 64, + [65] = 52, + [66] = 53, + [67] = 46, + [68] = 68, + [69] = 64, + [70] = 64, + [71] = 71, + [72] = 71, + [73] = 73, + [74] = 71, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 78, + [79] = 79, + [80] = 75, + [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] = 87, + [97] = 97, + [98] = 98, + [99] = 99, + [100] = 100, + [101] = 101, + [102] = 102, + [103] = 103, + [104] = 104, + [105] = 105, + [106] = 106, + [107] = 107, + [108] = 108, + [109] = 109, + [110] = 110, + [111] = 111, + [112] = 112, + [113] = 91, + [114] = 114, + [115] = 106, + [116] = 89, + [117] = 97, + [118] = 112, + [119] = 119, + [120] = 120, + [121] = 121, + [122] = 84, + [123] = 123, + [124] = 75, + [125] = 110, + [126] = 101, + [127] = 104, + [128] = 107, + [129] = 108, + [130] = 109, + [131] = 79, + [132] = 76, + [133] = 78, + [134] = 90, + [135] = 111, + [136] = 136, + [137] = 103, + [138] = 99, + [139] = 83, + [140] = 140, + [141] = 102, + [142] = 142, + [143] = 98, + [144] = 92, + [145] = 77, + [146] = 93, + [147] = 94, + [148] = 95, + [149] = 114, + [150] = 81, + [151] = 82, + [152] = 105, + [153] = 100, + [154] = 154, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 158, + [159] = 159, + [160] = 81, + [161] = 161, + [162] = 83, + [163] = 82, + [164] = 77, + [165] = 78, + [166] = 76, + [167] = 79, + [168] = 73, + [169] = 155, + [170] = 158, + [171] = 156, + [172] = 85, + [173] = 157, + [174] = 159, + [175] = 161, + [176] = 154, + [177] = 123, + [178] = 120, + [179] = 119, + [180] = 88, + [181] = 181, + [182] = 85, + [183] = 86, + [184] = 184, + [185] = 185, + [186] = 186, + [187] = 88, + [188] = 121, + [189] = 189, + [190] = 190, + [191] = 119, + [192] = 121, + [193] = 120, + [194] = 86, + [195] = 123, + [196] = 196, + [197] = 196, + [198] = 198, + [199] = 198, + [200] = 200, + [201] = 201, + [202] = 202, + [203] = 203, + [204] = 204, + [205] = 202, + [206] = 206, + [207] = 207, + [208] = 208, + [209] = 208, + [210] = 210, + [211] = 211, + [212] = 212, + [213] = 212, + [214] = 214, + [215] = 210, + [216] = 216, + [217] = 217, + [218] = 218, + [219] = 219, + [220] = 218, + [221] = 212, + [222] = 222, + [223] = 223, + [224] = 224, + [225] = 225, + [226] = 226, + [227] = 227, + [228] = 228, + [229] = 226, + [230] = 230, + [231] = 231, + [232] = 232, + [233] = 232, + [234] = 234, + [235] = 228, + [236] = 232, + [237] = 228, + [238] = 238, + [239] = 239, + [240] = 240, + [241] = 241, + [242] = 242, + [243] = 243, + [244] = 244, + [245] = 245, + [246] = 246, + [247] = 247, + [248] = 248, + [249] = 249, + [250] = 250, + [251] = 239, + [252] = 252, + [253] = 239, + [254] = 254, + [255] = 255, + [256] = 256, + [257] = 257, + [258] = 258, + [259] = 256, + [260] = 260, + [261] = 261, + [262] = 245, + [263] = 252, + [264] = 264, + [265] = 265, + [266] = 240, + [267] = 264, + [268] = 247, + [269] = 248, + [270] = 256, + [271] = 271, + [272] = 246, + [273] = 273, + [274] = 257, + [275] = 261, + [276] = 276, + [277] = 249, + [278] = 254, + [279] = 271, + [280] = 247, + [281] = 260, + [282] = 260, + [283] = 257, + [284] = 250, + [285] = 254, + [286] = 241, + [287] = 243, + [288] = 288, + [289] = 250, + [290] = 265, + [291] = 240, + [292] = 265, + [293] = 288, + [294] = 294, + [295] = 295, + [296] = 296, + [297] = 297, + [298] = 298, + [299] = 299, + [300] = 300, + [301] = 301, + [302] = 302, + [303] = 303, + [304] = 297, + [305] = 305, + [306] = 306, + [307] = 307, + [308] = 295, + [309] = 309, + [310] = 307, + [311] = 311, + [312] = 312, + [313] = 313, + [314] = 296, + [315] = 307, + [316] = 311, + [317] = 311, + [318] = 318, + [319] = 319, + [320] = 302, + [321] = 321, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(21); + ADVANCE_MAP( + '"', 51, + '#', 28, + '&', 40, + '\'', 50, + '(', 31, + ')', 32, + ',', 37, + '-', 11, + '.', 26, + ':', 39, + '=', 30, + '?', 29, + '[', 36, + '\\', 12, + ']', 38, + '{', 42, + '|', 33, + '}', 43, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(17); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 1: + if (lookahead == '\n') SKIP(2); + if (lookahead == '#') ADVANCE(28); + if (lookahead == '\\') ADVANCE(47); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(46); + if (lookahead != 0) ADVANCE(45); + END_STATE(); + case 2: + if (lookahead == '\n') SKIP(2); + if (lookahead == '#') ADVANCE(28); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(46); + if (lookahead != 0) ADVANCE(45); + END_STATE(); + case 3: + ADVANCE_MAP( + '"', 51, + '#', 28, + '\'', 50, + '(', 31, + '-', 13, + '.', 14, + ':', 39, + '[', 36, + '{', 42, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 4: + ADVANCE_MAP( + '"', 51, + '#', 28, + '\'', 50, + '(', 31, + '-', 13, + ':', 39, + '[', 36, + '{', 42, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 5: + if (lookahead == '"') ADVANCE(51); + if (lookahead == '#') ADVANCE(27); + if (lookahead == '\\') ADVANCE(12); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(48); + if (lookahead != 0) ADVANCE(49); + END_STATE(); + case 6: + ADVANCE_MAP( + '#', 28, + '&', 40, + '\'', 15, + '(', 31, + ')', 32, + ',', 37, + '-', 10, + '.', 24, + ':', 39, + '=', 30, + '?', 29, + '[', 36, + ']', 38, + '{', 42, + '|', 33, + '}', 43, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(6); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 7: + if (lookahead == '.') ADVANCE(9); + END_STATE(); + case 8: + if (lookahead == '.') ADVANCE(9); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(54); + END_STATE(); + case 9: + if (lookahead == '.') ADVANCE(34); + END_STATE(); + case 10: + if (lookahead == '>') ADVANCE(41); + END_STATE(); + case 11: + if (lookahead == '>') ADVANCE(41); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(53); + END_STATE(); + case 12: + ADVANCE_MAP( + '"', 44, + '\'', 44, + '0', 44, + '\\', 44, + 'b', 44, + 'f', 44, + 'n', 44, + 'r', 44, + 't', 44, + ); + END_STATE(); + case 13: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(53); + END_STATE(); + case 14: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(54); + END_STATE(); + case 15: + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); + END_STATE(); + case 16: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); + END_STATE(); + case 17: + if (eof) ADVANCE(21); + ADVANCE_MAP( + '"', 51, + '#', 28, + '&', 40, + '\'', 50, + '(', 31, + ')', 32, + ',', 37, + '-', 11, + '.', 25, + ':', 39, + '=', 30, + '?', 29, + '[', 36, + ']', 38, + '{', 42, + '|', 33, + '}', 43, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(17); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 18: + if (eof) ADVANCE(21); + ADVANCE_MAP( + '"', 51, + '#', 28, + '\'', 50, + '(', 31, + ')', 32, + ',', 37, + '-', 11, + '.', 24, + ':', 39, + '=', 30, + '[', 36, + ']', 38, + '{', 42, + '|', 33, + '}', 43, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(18); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 19: + if (eof) ADVANCE(21); + ADVANCE_MAP( + '#', 28, + '&', 40, + '\'', 15, + '(', 31, + ')', 32, + ',', 37, + '.', 8, + ':', 39, + '?', 29, + '[', 36, + ']', 38, + '{', 42, + '}', 43, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(20); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 20: + if (eof) ADVANCE(21); + ADVANCE_MAP( + '#', 28, + '&', 40, + '\'', 15, + '(', 31, + ')', 32, + ',', 37, + '.', 7, + ':', 39, + '?', 29, + '[', 36, + ']', 38, + '{', 42, + '}', 43, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(20); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 21: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 22: + ACCEPT_TOKEN(sym__identifier_tok); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(23); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(22); + END_STATE(); + case 23: + ACCEPT_TOKEN(sym__identifier_tok); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(23); + END_STATE(); + case 24: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 25: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(9); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(9); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(54); + END_STATE(); + case 27: + ACCEPT_TOKEN(sym_comment); + if (lookahead == '\n') ADVANCE(49); + if (lookahead == '"' || + lookahead == '\\') ADVANCE(28); + if (lookahead != 0) ADVANCE(27); + END_STATE(); + case 28: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(28); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_QMARK); + END_STATE(); + case 30: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 32: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 33: + ACCEPT_TOKEN(anon_sym_PIPE); + END_STATE(); + case 34: + ACCEPT_TOKEN(anon_sym_DOT_DOT_DOT); + END_STATE(); + case 35: + ACCEPT_TOKEN(sym_tag); + if (lookahead == '.') ADVANCE(16); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); + END_STATE(); + case 36: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 38: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 39: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == ':') ADVANCE(55); + END_STATE(); + case 40: + ACCEPT_TOKEN(anon_sym_AMP); + END_STATE(); + case 41: + ACCEPT_TOKEN(anon_sym_DASH_GT); + END_STATE(); + case 42: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 43: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 44: + ACCEPT_TOKEN(sym_escape_sequence); + END_STATE(); + case 45: + ACCEPT_TOKEN(sym_char_middle); + END_STATE(); + case 46: + ACCEPT_TOKEN(sym_char_middle); + if (lookahead == '#') ADVANCE(28); + if (lookahead == '\t' || + (0x0b <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(46); + if (lookahead != 0 && + (lookahead < '\t' || '\r' < lookahead)) ADVANCE(45); + END_STATE(); + case 47: + ACCEPT_TOKEN(sym_char_middle); + ADVANCE_MAP( + '"', 44, + '\'', 44, + '0', 44, + '\\', 44, + 'b', 44, + 'f', 44, + 'n', 44, + 'r', 44, + 't', 44, + ); + END_STATE(); + case 48: + ACCEPT_TOKEN(sym_string_middle); + if (lookahead == '#') ADVANCE(27); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(48); + if (lookahead != 0 && + lookahead != '"' && + lookahead != '#' && + lookahead != '\\') ADVANCE(49); + END_STATE(); + case 49: + ACCEPT_TOKEN(sym_string_middle); + if (lookahead != 0 && + lookahead != '"' && + lookahead != '\\') ADVANCE(49); + END_STATE(); + case 50: + ACCEPT_TOKEN(anon_sym_SQUOTE); + END_STATE(); + case 51: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 52: + ACCEPT_TOKEN(aux_sym_num_literal_token1); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(52); + END_STATE(); + case 53: + ACCEPT_TOKEN(aux_sym_num_literal_token2); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(53); + END_STATE(); + case 54: + ACCEPT_TOKEN(aux_sym_num_literal_token3); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(54); + END_STATE(); + case 55: + ACCEPT_TOKEN(anon_sym_COLON_COLON); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + ADVANCE_MAP( + 'a', 1, + 'd', 2, + 'e', 3, + 'i', 4, + 'l', 5, + 't', 6, + 'u', 7, + 'w', 8, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + END_STATE(); + case 1: + if (lookahead == 'w') ADVANCE(9); + END_STATE(); + case 2: + if (lookahead == 'e') ADVANCE(10); + END_STATE(); + case 3: + if (lookahead == 'x') ADVANCE(11); + END_STATE(); + case 4: + if (lookahead == 'n') ADVANCE(12); + END_STATE(); + case 5: + if (lookahead == 'e') ADVANCE(13); + END_STATE(); + case 6: + if (lookahead == 'y') ADVANCE(14); + END_STATE(); + case 7: + if (lookahead == 'n') ADVANCE(15); + END_STATE(); + case 8: + if (lookahead == 'i') ADVANCE(16); + END_STATE(); + case 9: + if (lookahead == 'a') ADVANCE(17); + END_STATE(); + case 10: + if (lookahead == 'f') ADVANCE(18); + END_STATE(); + case 11: + if (lookahead == 't') ADVANCE(19); + END_STATE(); + case 12: + ACCEPT_TOKEN(anon_sym_in); + END_STATE(); + case 13: + if (lookahead == 't') ADVANCE(20); + END_STATE(); + case 14: + if (lookahead == 'p') ADVANCE(21); + END_STATE(); + case 15: + if (lookahead == 'i') ADVANCE(22); + END_STATE(); + case 16: + if (lookahead == 't') ADVANCE(23); + END_STATE(); + case 17: + if (lookahead == 'i') ADVANCE(24); + END_STATE(); + case 18: + ACCEPT_TOKEN(anon_sym_def); + END_STATE(); + case 19: + if (lookahead == 'e') ADVANCE(25); + END_STATE(); + case 20: + ACCEPT_TOKEN(anon_sym_let); + END_STATE(); + case 21: + if (lookahead == 'e') ADVANCE(26); + END_STATE(); + case 22: + if (lookahead == 'o') ADVANCE(27); + END_STATE(); + case 23: + if (lookahead == 'h') ADVANCE(28); + END_STATE(); + case 24: + if (lookahead == 't') ADVANCE(29); + END_STATE(); + case 25: + if (lookahead == 'n') ADVANCE(30); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_type); + END_STATE(); + case 27: + if (lookahead == 'n') ADVANCE(31); + END_STATE(); + case 28: + ACCEPT_TOKEN(anon_sym_with); + END_STATE(); + case 29: + ACCEPT_TOKEN(anon_sym_await); + END_STATE(); + case 30: + if (lookahead == 'd') ADVANCE(32); + if (lookahead == 's') ADVANCE(33); + END_STATE(); + case 31: + ACCEPT_TOKEN(anon_sym_union); + END_STATE(); + case 32: + ACCEPT_TOKEN(anon_sym_extend); + END_STATE(); + case 33: + if (lookahead == 'i') ADVANCE(34); + END_STATE(); + case 34: + if (lookahead == 'b') ADVANCE(35); + END_STATE(); + case 35: + if (lookahead == 'l') ADVANCE(36); + END_STATE(); + case 36: + if (lookahead == 'e') ADVANCE(37); + END_STATE(); + case 37: + ACCEPT_TOKEN(anon_sym_extensible); + END_STATE(); + default: + return false; + } +} + +static const TSLexerMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 0, .reserved_word_set_id = 1}, + [3] = {.lex_state = 0, .reserved_word_set_id = 1}, + [4] = {.lex_state = 0, .reserved_word_set_id = 1}, + [5] = {.lex_state = 0, .reserved_word_set_id = 1}, + [6] = {.lex_state = 0, .reserved_word_set_id = 1}, + [7] = {.lex_state = 0, .reserved_word_set_id = 1}, + [8] = {.lex_state = 0, .reserved_word_set_id = 1}, + [9] = {.lex_state = 0, .reserved_word_set_id = 1}, + [10] = {.lex_state = 0, .reserved_word_set_id = 1}, + [11] = {.lex_state = 0, .reserved_word_set_id = 1}, + [12] = {.lex_state = 0, .reserved_word_set_id = 1}, + [13] = {.lex_state = 0, .reserved_word_set_id = 1}, + [14] = {.lex_state = 0, .reserved_word_set_id = 1}, + [15] = {.lex_state = 0, .reserved_word_set_id = 1}, + [16] = {.lex_state = 0, .reserved_word_set_id = 1}, + [17] = {.lex_state = 0, .reserved_word_set_id = 1}, + [18] = {.lex_state = 0, .reserved_word_set_id = 1}, + [19] = {.lex_state = 0, .reserved_word_set_id = 1}, + [20] = {.lex_state = 0, .reserved_word_set_id = 1}, + [21] = {.lex_state = 19, .reserved_word_set_id = 2}, + [22] = {.lex_state = 0, .reserved_word_set_id = 1}, + [23] = {.lex_state = 0, .reserved_word_set_id = 1}, + [24] = {.lex_state = 0, .reserved_word_set_id = 1}, + [25] = {.lex_state = 0, .reserved_word_set_id = 1}, + [26] = {.lex_state = 0, .reserved_word_set_id = 1}, + [27] = {.lex_state = 0, .reserved_word_set_id = 1}, + [28] = {.lex_state = 19, .reserved_word_set_id = 1}, + [29] = {.lex_state = 0, .reserved_word_set_id = 1}, + [30] = {.lex_state = 0, .reserved_word_set_id = 1}, + [31] = {.lex_state = 0, .reserved_word_set_id = 1}, + [32] = {.lex_state = 0, .reserved_word_set_id = 1}, + [33] = {.lex_state = 0, .reserved_word_set_id = 1}, + [34] = {.lex_state = 0, .reserved_word_set_id = 1}, + [35] = {.lex_state = 19, .reserved_word_set_id = 2}, + [36] = {.lex_state = 0, .reserved_word_set_id = 1}, + [37] = {.lex_state = 0, .reserved_word_set_id = 1}, + [38] = {.lex_state = 0, .reserved_word_set_id = 1}, + [39] = {.lex_state = 0, .reserved_word_set_id = 1}, + [40] = {.lex_state = 0, .reserved_word_set_id = 1}, + [41] = {.lex_state = 0, .reserved_word_set_id = 1}, + [42] = {.lex_state = 0, .reserved_word_set_id = 1}, + [43] = {.lex_state = 19, .reserved_word_set_id = 1}, + [44] = {.lex_state = 19, .reserved_word_set_id = 1}, + [45] = {.lex_state = 19, .reserved_word_set_id = 1}, + [46] = {.lex_state = 19, .reserved_word_set_id = 2}, + [47] = {.lex_state = 19, .reserved_word_set_id = 1}, + [48] = {.lex_state = 19, .reserved_word_set_id = 2}, + [49] = {.lex_state = 19, .reserved_word_set_id = 1}, + [50] = {.lex_state = 19, .reserved_word_set_id = 2}, + [51] = {.lex_state = 19, .reserved_word_set_id = 2}, + [52] = {.lex_state = 19, .reserved_word_set_id = 2}, + [53] = {.lex_state = 19, .reserved_word_set_id = 2}, + [54] = {.lex_state = 19, .reserved_word_set_id = 2}, + [55] = {.lex_state = 19, .reserved_word_set_id = 2}, + [56] = {.lex_state = 19, .reserved_word_set_id = 2}, + [57] = {.lex_state = 19, .reserved_word_set_id = 1}, + [58] = {.lex_state = 19, .reserved_word_set_id = 1}, + [59] = {.lex_state = 19, .reserved_word_set_id = 1}, + [60] = {.lex_state = 19, .reserved_word_set_id = 1}, + [61] = {.lex_state = 19, .reserved_word_set_id = 1}, + [62] = {.lex_state = 19, .reserved_word_set_id = 1}, + [63] = {.lex_state = 19, .reserved_word_set_id = 2}, + [64] = {.lex_state = 19, .reserved_word_set_id = 1}, + [65] = {.lex_state = 19, .reserved_word_set_id = 1}, + [66] = {.lex_state = 19, .reserved_word_set_id = 2}, + [67] = {.lex_state = 19, .reserved_word_set_id = 1}, + [68] = {.lex_state = 19, .reserved_word_set_id = 1}, + [69] = {.lex_state = 19, .reserved_word_set_id = 2}, + [70] = {.lex_state = 19, .reserved_word_set_id = 1}, + [71] = {.lex_state = 0, .reserved_word_set_id = 1}, + [72] = {.lex_state = 0, .reserved_word_set_id = 3}, + [73] = {.lex_state = 18, .reserved_word_set_id = 2}, + [74] = {.lex_state = 0, .reserved_word_set_id = 1}, + [75] = {.lex_state = 6, .reserved_word_set_id = 2}, + [76] = {.lex_state = 0, .reserved_word_set_id = 1}, + [77] = {.lex_state = 0, .reserved_word_set_id = 1}, + [78] = {.lex_state = 0, .reserved_word_set_id = 1}, + [79] = {.lex_state = 0, .reserved_word_set_id = 1}, + [80] = {.lex_state = 18, .reserved_word_set_id = 1}, + [81] = {.lex_state = 18, .reserved_word_set_id = 1}, + [82] = {.lex_state = 18, .reserved_word_set_id = 1}, + [83] = {.lex_state = 18, .reserved_word_set_id = 1}, + [84] = {.lex_state = 3, .reserved_word_set_id = 1}, + [85] = {.lex_state = 0, .reserved_word_set_id = 1}, + [86] = {.lex_state = 0, .reserved_word_set_id = 1}, + [87] = {.lex_state = 0, .reserved_word_set_id = 3}, + [88] = {.lex_state = 0, .reserved_word_set_id = 1}, + [89] = {.lex_state = 0, .reserved_word_set_id = 1}, + [90] = {.lex_state = 0, .reserved_word_set_id = 1}, + [91] = {.lex_state = 0, .reserved_word_set_id = 1}, + [92] = {.lex_state = 0, .reserved_word_set_id = 1}, + [93] = {.lex_state = 0, .reserved_word_set_id = 1}, + [94] = {.lex_state = 0, .reserved_word_set_id = 1}, + [95] = {.lex_state = 0, .reserved_word_set_id = 1}, + [96] = {.lex_state = 0, .reserved_word_set_id = 1}, + [97] = {.lex_state = 0, .reserved_word_set_id = 1}, + [98] = {.lex_state = 0, .reserved_word_set_id = 1}, + [99] = {.lex_state = 0, .reserved_word_set_id = 1}, + [100] = {.lex_state = 0, .reserved_word_set_id = 1}, + [101] = {.lex_state = 0, .reserved_word_set_id = 1}, + [102] = {.lex_state = 0, .reserved_word_set_id = 1}, + [103] = {.lex_state = 0, .reserved_word_set_id = 1}, + [104] = {.lex_state = 0, .reserved_word_set_id = 1}, + [105] = {.lex_state = 0, .reserved_word_set_id = 1}, + [106] = {.lex_state = 0, .reserved_word_set_id = 1}, + [107] = {.lex_state = 0, .reserved_word_set_id = 1}, + [108] = {.lex_state = 0, .reserved_word_set_id = 1}, + [109] = {.lex_state = 0, .reserved_word_set_id = 1}, + [110] = {.lex_state = 0, .reserved_word_set_id = 3}, + [111] = {.lex_state = 0, .reserved_word_set_id = 1}, + [112] = {.lex_state = 0, .reserved_word_set_id = 1}, + [113] = {.lex_state = 0, .reserved_word_set_id = 3}, + [114] = {.lex_state = 0, .reserved_word_set_id = 1}, + [115] = {.lex_state = 0, .reserved_word_set_id = 3}, + [116] = {.lex_state = 0, .reserved_word_set_id = 3}, + [117] = {.lex_state = 0, .reserved_word_set_id = 3}, + [118] = {.lex_state = 0, .reserved_word_set_id = 3}, + [119] = {.lex_state = 0, .reserved_word_set_id = 1}, + [120] = {.lex_state = 0, .reserved_word_set_id = 1}, + [121] = {.lex_state = 0, .reserved_word_set_id = 1}, + [122] = {.lex_state = 19}, + [123] = {.lex_state = 0, .reserved_word_set_id = 1}, + [124] = {.lex_state = 18, .reserved_word_set_id = 3}, + [125] = {.lex_state = 0, .reserved_word_set_id = 1}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 0}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 0}, + [131] = {.lex_state = 0, .reserved_word_set_id = 3}, + [132] = {.lex_state = 0, .reserved_word_set_id = 3}, + [133] = {.lex_state = 0, .reserved_word_set_id = 3}, + [134] = {.lex_state = 0}, + [135] = {.lex_state = 0}, + [136] = {.lex_state = 0}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 0}, + [139] = {.lex_state = 18, .reserved_word_set_id = 2}, + [140] = {.lex_state = 0, .reserved_word_set_id = 1}, + [141] = {.lex_state = 0}, + [142] = {.lex_state = 0}, + [143] = {.lex_state = 0}, + [144] = {.lex_state = 0}, + [145] = {.lex_state = 0, .reserved_word_set_id = 3}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 0}, + [148] = {.lex_state = 0}, + [149] = {.lex_state = 0}, + [150] = {.lex_state = 18, .reserved_word_set_id = 2}, + [151] = {.lex_state = 18, .reserved_word_set_id = 2}, + [152] = {.lex_state = 0}, + [153] = {.lex_state = 0}, + [154] = {.lex_state = 0, .reserved_word_set_id = 1}, + [155] = {.lex_state = 0, .reserved_word_set_id = 1}, + [156] = {.lex_state = 0, .reserved_word_set_id = 1}, + [157] = {.lex_state = 0, .reserved_word_set_id = 1}, + [158] = {.lex_state = 0, .reserved_word_set_id = 1}, + [159] = {.lex_state = 0, .reserved_word_set_id = 1}, + [160] = {.lex_state = 18, .reserved_word_set_id = 3}, + [161] = {.lex_state = 0, .reserved_word_set_id = 1}, + [162] = {.lex_state = 18, .reserved_word_set_id = 3}, + [163] = {.lex_state = 18, .reserved_word_set_id = 3}, + [164] = {.lex_state = 0, .reserved_word_set_id = 1}, + [165] = {.lex_state = 0, .reserved_word_set_id = 1}, + [166] = {.lex_state = 0, .reserved_word_set_id = 1}, + [167] = {.lex_state = 0, .reserved_word_set_id = 1}, + [168] = {.lex_state = 18, .reserved_word_set_id = 3}, + [169] = {.lex_state = 0}, + [170] = {.lex_state = 0}, + [171] = {.lex_state = 0}, + [172] = {.lex_state = 0}, + [173] = {.lex_state = 0}, + [174] = {.lex_state = 0}, + [175] = {.lex_state = 0}, + [176] = {.lex_state = 0}, + [177] = {.lex_state = 0}, + [178] = {.lex_state = 0}, + [179] = {.lex_state = 0}, + [180] = {.lex_state = 0}, + [181] = {.lex_state = 0}, + [182] = {.lex_state = 0}, + [183] = {.lex_state = 0}, + [184] = {.lex_state = 0}, + [185] = {.lex_state = 0}, + [186] = {.lex_state = 0}, + [187] = {.lex_state = 0}, + [188] = {.lex_state = 0}, + [189] = {.lex_state = 0}, + [190] = {.lex_state = 19, .reserved_word_set_id = 1}, + [191] = {.lex_state = 0}, + [192] = {.lex_state = 0}, + [193] = {.lex_state = 0}, + [194] = {.lex_state = 0}, + [195] = {.lex_state = 0}, + [196] = {.lex_state = 19, .reserved_word_set_id = 1}, + [197] = {.lex_state = 19, .reserved_word_set_id = 1}, + [198] = {.lex_state = 19, .reserved_word_set_id = 1}, + [199] = {.lex_state = 19, .reserved_word_set_id = 1}, + [200] = {.lex_state = 0}, + [201] = {.lex_state = 0}, + [202] = {.lex_state = 0, .reserved_word_set_id = 1}, + [203] = {.lex_state = 0, .reserved_word_set_id = 1}, + [204] = {.lex_state = 0}, + [205] = {.lex_state = 0, .reserved_word_set_id = 1}, + [206] = {.lex_state = 0}, + [207] = {.lex_state = 0, .reserved_word_set_id = 1}, + [208] = {.lex_state = 0, .reserved_word_set_id = 1}, + [209] = {.lex_state = 0, .reserved_word_set_id = 1}, + [210] = {.lex_state = 5}, + [211] = {.lex_state = 0, .reserved_word_set_id = 1}, + [212] = {.lex_state = 0, .reserved_word_set_id = 1}, + [213] = {.lex_state = 0, .reserved_word_set_id = 1}, + [214] = {.lex_state = 0}, + [215] = {.lex_state = 5}, + [216] = {.lex_state = 18, .reserved_word_set_id = 1}, + [217] = {.lex_state = 5}, + [218] = {.lex_state = 5}, + [219] = {.lex_state = 0}, + [220] = {.lex_state = 5}, + [221] = {.lex_state = 0, .reserved_word_set_id = 1}, + [222] = {.lex_state = 0, .reserved_word_set_id = 1}, + [223] = {.lex_state = 0}, + [224] = {.lex_state = 0, .reserved_word_set_id = 1}, + [225] = {.lex_state = 0}, + [226] = {.lex_state = 0}, + [227] = {.lex_state = 0, .reserved_word_set_id = 1}, + [228] = {.lex_state = 0}, + [229] = {.lex_state = 0}, + [230] = {.lex_state = 0, .reserved_word_set_id = 1}, + [231] = {.lex_state = 0, .reserved_word_set_id = 1}, + [232] = {.lex_state = 0}, + [233] = {.lex_state = 0}, + [234] = {.lex_state = 0}, + [235] = {.lex_state = 0}, + [236] = {.lex_state = 0}, + [237] = {.lex_state = 0}, + [238] = {.lex_state = 19, .reserved_word_set_id = 1}, + [239] = {.lex_state = 0, .reserved_word_set_id = 1}, + [240] = {.lex_state = 0, .reserved_word_set_id = 1}, + [241] = {.lex_state = 1}, + [242] = {.lex_state = 0, .reserved_word_set_id = 1}, + [243] = {.lex_state = 0}, + [244] = {.lex_state = 0}, + [245] = {.lex_state = 0}, + [246] = {.lex_state = 0}, + [247] = {.lex_state = 0, .reserved_word_set_id = 1}, + [248] = {.lex_state = 0}, + [249] = {.lex_state = 0}, + [250] = {.lex_state = 0, .reserved_word_set_id = 1}, + [251] = {.lex_state = 0, .reserved_word_set_id = 1}, + [252] = {.lex_state = 0}, + [253] = {.lex_state = 0, .reserved_word_set_id = 1}, + [254] = {.lex_state = 0, .reserved_word_set_id = 1}, + [255] = {.lex_state = 0, .reserved_word_set_id = 1}, + [256] = {.lex_state = 0}, + [257] = {.lex_state = 0}, + [258] = {.lex_state = 0}, + [259] = {.lex_state = 0}, + [260] = {.lex_state = 0, .reserved_word_set_id = 1}, + [261] = {.lex_state = 0}, + [262] = {.lex_state = 0}, + [263] = {.lex_state = 0}, + [264] = {.lex_state = 0}, + [265] = {.lex_state = 0, .reserved_word_set_id = 1}, + [266] = {.lex_state = 0, .reserved_word_set_id = 1}, + [267] = {.lex_state = 0}, + [268] = {.lex_state = 0, .reserved_word_set_id = 1}, + [269] = {.lex_state = 0}, + [270] = {.lex_state = 0}, + [271] = {.lex_state = 0}, + [272] = {.lex_state = 0}, + [273] = {.lex_state = 0}, + [274] = {.lex_state = 0}, + [275] = {.lex_state = 0}, + [276] = {.lex_state = 0}, + [277] = {.lex_state = 0}, + [278] = {.lex_state = 0, .reserved_word_set_id = 1}, + [279] = {.lex_state = 0}, + [280] = {.lex_state = 0, .reserved_word_set_id = 1}, + [281] = {.lex_state = 0, .reserved_word_set_id = 1}, + [282] = {.lex_state = 0, .reserved_word_set_id = 1}, + [283] = {.lex_state = 0}, + [284] = {.lex_state = 0, .reserved_word_set_id = 1}, + [285] = {.lex_state = 0, .reserved_word_set_id = 1}, + [286] = {.lex_state = 1}, + [287] = {.lex_state = 0}, + [288] = {.lex_state = 0}, + [289] = {.lex_state = 0, .reserved_word_set_id = 1}, + [290] = {.lex_state = 0, .reserved_word_set_id = 1}, + [291] = {.lex_state = 0, .reserved_word_set_id = 1}, + [292] = {.lex_state = 0, .reserved_word_set_id = 1}, + [293] = {.lex_state = 0}, + [294] = {.lex_state = 0, .reserved_word_set_id = 1}, + [295] = {.lex_state = 0}, + [296] = {.lex_state = 0}, + [297] = {.lex_state = 0}, + [298] = {.lex_state = 0}, + [299] = {.lex_state = 0}, + [300] = {.lex_state = 0}, + [301] = {.lex_state = 0, .reserved_word_set_id = 1}, + [302] = {.lex_state = 0}, + [303] = {.lex_state = 0}, + [304] = {.lex_state = 0}, + [305] = {.lex_state = 0}, + [306] = {.lex_state = 0}, + [307] = {.lex_state = 0}, + [308] = {.lex_state = 0}, + [309] = {.lex_state = 19}, + [310] = {.lex_state = 0}, + [311] = {.lex_state = 0}, + [312] = {.lex_state = 0}, + [313] = {.lex_state = 0}, + [314] = {.lex_state = 0}, + [315] = {.lex_state = 0}, + [316] = {.lex_state = 0}, + [317] = {.lex_state = 0}, + [318] = {.lex_state = 0}, + [319] = {.lex_state = 0}, + [320] = {.lex_state = 0}, + [321] = {.lex_state = 0}, +}; + +static const TSSymbol ts_reserved_words[4][MAX_RESERVED_WORD_SET_SIZE] = { + [1] = { + anon_sym_extensible, + anon_sym_union, + anon_sym_extend, + anon_sym_with, + anon_sym_type, + anon_sym_def, + }, + [2] = { + anon_sym_extensible, + anon_sym_union, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + }, + [3] = { + anon_sym_union, + anon_sym_with, + }, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [STATE(0)] = { + [ts_builtin_sym_end] = ACTIONS(1), + [sym__identifier_tok] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + [anon_sym_extensible] = ACTIONS(1), + [anon_sym_union] = ACTIONS(1), + [anon_sym_extend] = ACTIONS(1), + [anon_sym_with] = ACTIONS(1), + [anon_sym_type] = ACTIONS(1), + [anon_sym_QMARK] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_DOT_DOT_DOT] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_AMP] = ACTIONS(1), + [anon_sym_DASH_GT] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [sym_escape_sequence] = ACTIONS(1), + [anon_sym_SQUOTE] = ACTIONS(1), + [anon_sym_DQUOTE] = ACTIONS(1), + [aux_sym_num_literal_token1] = ACTIONS(1), + [aux_sym_num_literal_token2] = ACTIONS(1), + [aux_sym_num_literal_token3] = ACTIONS(1), + [anon_sym_let] = ACTIONS(1), + [anon_sym_in] = ACTIONS(1), + [anon_sym_await] = ACTIONS(1), + [anon_sym_COLON_COLON] = ACTIONS(1), + [anon_sym_def] = ACTIONS(1), + }, + [STATE(1)] = { + [sym_source_file] = STATE(298), + [sym__definition] = STATE(142), + [sym_extensible_union] = STATE(142), + [sym_extend_decl] = STATE(142), + [sym_full_partial_type_definition] = STATE(142), + [sym_type_definition] = STATE(142), + [sym_def] = STATE(142), + [aux_sym_source_file_repeat1] = STATE(142), + [ts_builtin_sym_end] = ACTIONS(5), + [sym_comment] = ACTIONS(3), + [anon_sym_extensible] = ACTIONS(7), + [anon_sym_extend] = ACTIONS(9), + [anon_sym_type] = ACTIONS(11), + [anon_sym_def] = ACTIONS(13), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(15), 1, + sym__identifier_tok, + ACTIONS(18), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(26), 1, + anon_sym_LBRACE, + ACTIONS(29), 1, + anon_sym_SQUOTE, + ACTIONS(32), 1, + anon_sym_DQUOTE, + ACTIONS(38), 1, + anon_sym_let, + ACTIONS(41), 1, + anon_sym_await, + STATE(2), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(303), 1, + sym_expression, + ACTIONS(21), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + ACTIONS(35), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [62] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(50), 1, + anon_sym_RBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(2), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(279), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [123] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(64), 1, + anon_sym_RPAREN, + STATE(6), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(261), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [184] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(66), 1, + anon_sym_RPAREN, + STATE(2), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(277), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [245] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(68), 1, + anon_sym_RPAREN, + STATE(2), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(249), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [306] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(70), 1, + anon_sym_RBRACK, + STATE(3), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(252), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [367] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(72), 1, + anon_sym_RBRACK, + STATE(9), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(263), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [428] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(74), 1, + anon_sym_RBRACK, + STATE(2), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(271), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [489] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(76), 1, + anon_sym_RPAREN, + STATE(5), 1, + aux_sym_list_expression_repeat1, + STATE(182), 1, + sym_identifier, + STATE(275), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [550] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(82), 1, + anon_sym_in, + ACTIONS(84), 1, + anon_sym_await, + STATE(171), 1, + sym_expression, + STATE(172), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [608] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + ACTIONS(86), 1, + anon_sym_in, + STATE(169), 1, + sym_expression, + STATE(172), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [666] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(88), 1, + anon_sym_in, + STATE(169), 1, + sym_expression, + STATE(182), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [724] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + ACTIONS(90), 1, + anon_sym_in, + STATE(171), 1, + sym_expression, + STATE(182), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [782] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(108), 1, + anon_sym_in, + ACTIONS(110), 1, + anon_sym_await, + STATE(85), 1, + sym_identifier, + STATE(155), 1, + sym_expression, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [840] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + ACTIONS(112), 1, + anon_sym_in, + STATE(85), 1, + sym_identifier, + STATE(156), 1, + sym_expression, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [898] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + STATE(172), 1, + sym_identifier, + STATE(176), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [953] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + STATE(172), 1, + sym_identifier, + STATE(201), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1008] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + STATE(172), 1, + sym_identifier, + STATE(174), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1063] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(182), 1, + sym_identifier, + STATE(296), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1118] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(120), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(143), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [1175] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(175), 1, + sym_expression, + STATE(182), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1230] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(182), 1, + sym_identifier, + STATE(244), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1285] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(12), 1, + sym_expression, + STATE(85), 1, + sym_identifier, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1340] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(173), 1, + sym_expression, + STATE(182), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1395] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(174), 1, + sym_expression, + STATE(182), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1450] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(176), 1, + sym_expression, + STATE(182), 1, + sym_identifier, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1505] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(130), 1, + anon_sym_with, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(136), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(138), 1, + sym_tag, + ACTIONS(140), 1, + anon_sym_AMP, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(221), 1, + sym_multi_type_parameters, + STATE(76), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(98), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [1562] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(85), 1, + sym_identifier, + STATE(161), 1, + sym_expression, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1617] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(11), 1, + sym_expression, + STATE(85), 1, + sym_identifier, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1672] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + STATE(172), 1, + sym_identifier, + STATE(175), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1727] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(85), 1, + sym_identifier, + STATE(157), 1, + sym_expression, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1782] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(85), 1, + sym_identifier, + STATE(159), 1, + sym_expression, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1837] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(85), 1, + sym_identifier, + STATE(154), 1, + sym_expression, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [1892] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(148), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(143), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [1949] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + STATE(172), 1, + sym_identifier, + STATE(206), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2004] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(80), 1, + anon_sym_let, + ACTIONS(84), 1, + anon_sym_await, + STATE(172), 1, + sym_identifier, + STATE(173), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(180), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2059] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(13), 1, + sym_expression, + STATE(85), 1, + sym_identifier, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2114] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(14), 1, + sym_expression, + STATE(85), 1, + sym_identifier, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2169] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(46), 1, + anon_sym_LPAREN, + ACTIONS(48), 1, + anon_sym_LBRACK, + ACTIONS(52), 1, + anon_sym_LBRACE, + ACTIONS(54), 1, + anon_sym_SQUOTE, + ACTIONS(56), 1, + anon_sym_DQUOTE, + ACTIONS(60), 1, + anon_sym_let, + ACTIONS(62), 1, + anon_sym_await, + STATE(182), 1, + sym_identifier, + STATE(314), 1, + sym_expression, + ACTIONS(58), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(170), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(187), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2224] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(15), 1, + sym_expression, + STATE(85), 1, + sym_identifier, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2279] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(94), 1, + anon_sym_LPAREN, + ACTIONS(96), 1, + anon_sym_LBRACK, + ACTIONS(98), 1, + anon_sym_LBRACE, + ACTIONS(100), 1, + anon_sym_SQUOTE, + ACTIONS(102), 1, + anon_sym_DQUOTE, + ACTIONS(106), 1, + anon_sym_let, + ACTIONS(110), 1, + anon_sym_await, + STATE(16), 1, + sym_expression, + STATE(85), 1, + sym_identifier, + ACTIONS(104), 2, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + STATE(158), 4, + sym_let_binding, + sym_await_binding, + sym_type_downcast, + sym_lambda, + STATE(88), 9, + sym_char_literal, + sym_string_literal, + sym_num_literal, + sym_list_expression, + sym_field_access, + sym_function_call, + sym_ident_expr, + sym_record_expr, + sym__atom, + [2334] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(181), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2388] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(185), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2442] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(186), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2496] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(226), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2550] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(204), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2604] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(177), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2658] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(189), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2712] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(191), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2766] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(193), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2820] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(192), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2874] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(194), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2928] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(195), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [2982] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(179), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3036] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(214), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3090] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(130), 1, + anon_sym_with, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(138), 1, + sym_tag, + ACTIONS(140), 1, + anon_sym_AMP, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(221), 1, + sym_multi_type_parameters, + STATE(76), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(119), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3144] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(130), 1, + anon_sym_with, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(138), 1, + sym_tag, + ACTIONS(140), 1, + anon_sym_AMP, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(221), 1, + sym_multi_type_parameters, + STATE(76), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(120), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3198] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(184), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3252] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(130), 1, + anon_sym_with, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(138), 1, + sym_tag, + ACTIONS(140), 1, + anon_sym_AMP, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(221), 1, + sym_multi_type_parameters, + STATE(76), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(121), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3306] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(130), 1, + anon_sym_with, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(138), 1, + sym_tag, + ACTIONS(140), 1, + anon_sym_AMP, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(221), 1, + sym_multi_type_parameters, + STATE(76), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(86), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3360] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(130), 1, + anon_sym_with, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(138), 1, + sym_tag, + ACTIONS(140), 1, + anon_sym_AMP, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(221), 1, + sym_multi_type_parameters, + STATE(76), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(123), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3414] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(178), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3468] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(258), 2, + sym__type, + sym_fn_type, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(257), 7, + sym__type_non_fn, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + [3524] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(188), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3578] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(144), 1, + anon_sym_with, + ACTIONS(146), 1, + anon_sym_QMARK, + ACTIONS(150), 1, + sym_tag, + ACTIONS(152), 1, + anon_sym_AMP, + STATE(116), 1, + sym_path, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + STATE(132), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(183), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3632] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(229), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3686] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(219), 9, + sym__type_non_fn, + sym__type, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + sym_fn_type, + [3740] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(258), 2, + sym__type, + sym_fn_type, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(274), 7, + sym__type_non_fn, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + [3796] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(44), 1, + sym__identifier_tok, + ACTIONS(114), 1, + anon_sym_with, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(122), 1, + sym_tag, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(126), 1, + anon_sym_AMP, + ACTIONS(128), 1, + anon_sym_LBRACE, + STATE(116), 1, + sym_path, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(258), 2, + sym__type, + sym_fn_type, + STATE(166), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + STATE(283), 7, + sym__type_non_fn, + sym_union_type, + sym_partial_union_type, + sym_tagged_type, + sym_parametrized_type, + sym_with_type, + sym_recursive_type, + [3852] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(132), 1, + anon_sym_QMARK, + ACTIONS(134), 1, + anon_sym_LPAREN, + ACTIONS(142), 1, + anon_sym_LBRACE, + STATE(81), 1, + sym_identifier, + STATE(89), 1, + sym_path, + STATE(90), 1, + sym_parametrized_type, + STATE(221), 1, + sym_multi_type_parameters, + ACTIONS(156), 3, + anon_sym_let, + anon_sym_in, + anon_sym_await, + STATE(79), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + ACTIONS(154), 6, + anon_sym_PIPE, + anon_sym_DASH_GT, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [3902] = 13, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(146), 1, + anon_sym_QMARK, + STATE(116), 1, + sym_path, + STATE(134), 1, + sym_parametrized_type, + STATE(160), 1, + sym_identifier, + STATE(212), 1, + sym_multi_type_parameters, + ACTIONS(154), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(156), 4, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + STATE(131), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + [3951] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(158), 5, + sym__identifier_tok, + anon_sym_with, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(160), 16, + anon_sym_DOT, + anon_sym_EQ, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [3980] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(116), 1, + anon_sym_QMARK, + ACTIONS(118), 1, + anon_sym_LPAREN, + ACTIONS(124), 1, + anon_sym_LBRACK, + ACTIONS(128), 1, + anon_sym_LBRACE, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(116), 1, + sym_path, + STATE(134), 1, + sym_parametrized_type, + STATE(150), 1, + sym_identifier, + STATE(213), 1, + sym_multi_type_parameters, + STATE(167), 4, + sym__type_atom, + sym_partial_type, + sym_just_type, + sym_record_type, + ACTIONS(154), 6, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [4025] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 3, + sym__identifier_tok, + anon_sym_with, + anon_sym_COLON, + ACTIONS(166), 15, + anon_sym_DOT, + anon_sym_QMARK, + anon_sym_EQ, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PIPE, + sym_tag, + anon_sym_LBRACK, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_AMP, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + [4051] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + STATE(81), 1, + sym_identifier, + STATE(78), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(170), 3, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(168), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4081] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(172), 1, + sym__identifier_tok, + STATE(81), 1, + sym_identifier, + STATE(77), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(177), 3, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(175), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4111] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(81), 1, + sym_identifier, + STATE(77), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(179), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(181), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4139] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(92), 1, + sym__identifier_tok, + STATE(81), 1, + sym_identifier, + STATE(78), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(185), 3, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(183), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4169] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(166), 11, + anon_sym_DOT, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4193] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(189), 1, + anon_sym_DOT, + STATE(83), 1, + aux_sym_path_repeat1, + ACTIONS(187), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(191), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4220] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(193), 1, + anon_sym_DOT, + STATE(82), 1, + aux_sym_path_repeat1, + ACTIONS(158), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(160), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4247] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(189), 1, + anon_sym_DOT, + STATE(82), 1, + aux_sym_path_repeat1, + ACTIONS(196), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(198), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4274] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(204), 1, + aux_sym_num_literal_token3, + ACTIONS(200), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(202), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4298] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(210), 1, + anon_sym_COLON, + ACTIONS(212), 1, + anon_sym_DASH_GT, + ACTIONS(206), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(208), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4324] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(218), 1, + anon_sym_PIPE, + ACTIONS(214), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(216), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4347] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(222), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(220), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [4368] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(226), 1, + anon_sym_LPAREN, + ACTIONS(230), 1, + anon_sym_COLON, + ACTIONS(232), 1, + anon_sym_COLON_COLON, + ACTIONS(224), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(228), 6, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4395] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(234), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(236), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4416] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(185), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(183), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4437] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(238), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(240), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4458] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(242), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(244), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4479] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(246), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(248), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4500] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(250), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(252), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4521] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(254), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(256), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4542] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(222), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(220), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4563] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(258), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(260), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4584] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(262), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(264), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4605] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(266), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(268), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4626] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(270), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(272), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4647] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(276), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4668] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(280), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4689] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(282), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(284), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4710] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(286), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(288), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4731] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(290), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(292), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4752] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(294), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(296), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4773] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(298), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(300), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4794] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(302), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(304), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4815] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(306), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(308), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4836] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(312), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(310), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [4857] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(314), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(316), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4878] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(318), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(320), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [4899] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(238), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(240), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [4920] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(322), 5, + sym__identifier_tok, + anon_sym_COLON, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(324), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + anon_sym_COLON_COLON, + [4941] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(294), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(296), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [4962] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(234), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(236), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [4983] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(258), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(260), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [5004] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(318), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(320), 8, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [5025] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(218), 1, + anon_sym_PIPE, + ACTIONS(326), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(328), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5048] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(218), 1, + anon_sym_PIPE, + ACTIONS(330), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(332), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5071] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(218), 1, + anon_sym_PIPE, + ACTIONS(338), 1, + anon_sym_DASH_GT, + ACTIONS(334), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(336), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5096] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(200), 1, + anon_sym_COLON, + ACTIONS(340), 1, + aux_sym_num_literal_token3, + ACTIONS(202), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5119] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(218), 1, + anon_sym_PIPE, + ACTIONS(342), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(344), 8, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5142] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(164), 6, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_COLON, + anon_sym_def, + ACTIONS(166), 7, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_EQ, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_DASH_GT, + anon_sym_COLON_COLON, + [5163] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(312), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(310), 9, + anon_sym_LPAREN, + anon_sym_PIPE, + anon_sym_LBRACK, + anon_sym_DASH_GT, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5184] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(274), 1, + anon_sym_COLON, + ACTIONS(276), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5204] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(286), 1, + anon_sym_COLON, + ACTIONS(288), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5224] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(300), 12, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + anon_sym_def, + [5242] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(302), 1, + anon_sym_COLON, + ACTIONS(304), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5262] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(306), 1, + anon_sym_COLON, + ACTIONS(308), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5282] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + STATE(160), 1, + sym_identifier, + STATE(133), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(183), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(185), 4, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [5308] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + STATE(160), 1, + sym_identifier, + STATE(133), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(168), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(170), 4, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [5334] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + sym__identifier_tok, + STATE(160), 1, + sym_identifier, + STATE(145), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(179), 4, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(181), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + [5360] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(183), 12, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + anon_sym_def, + [5378] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(314), 1, + anon_sym_COLON, + ACTIONS(316), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5398] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(346), 1, + ts_builtin_sym_end, + ACTIONS(348), 1, + anon_sym_extensible, + ACTIONS(351), 1, + anon_sym_extend, + ACTIONS(354), 1, + anon_sym_type, + ACTIONS(357), 1, + anon_sym_def, + STATE(136), 7, + sym__definition, + sym_extensible_union, + sym_extend_decl, + sym_full_partial_type_definition, + sym_type_definition, + sym_def, + aux_sym_source_file_repeat1, + [5426] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(282), 1, + anon_sym_COLON, + ACTIONS(284), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5446] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(266), 1, + anon_sym_COLON, + ACTIONS(268), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5466] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(360), 1, + anon_sym_DOT, + STATE(151), 1, + aux_sym_path_repeat1, + ACTIONS(196), 2, + sym__identifier_tok, + anon_sym_with, + ACTIONS(198), 8, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [5490] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(362), 3, + sym__identifier_tok, + anon_sym_let, + anon_sym_await, + ACTIONS(21), 9, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5510] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(278), 1, + anon_sym_COLON, + ACTIONS(280), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5530] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_extensible, + ACTIONS(9), 1, + anon_sym_extend, + ACTIONS(11), 1, + anon_sym_type, + ACTIONS(13), 1, + anon_sym_def, + ACTIONS(364), 1, + ts_builtin_sym_end, + STATE(136), 7, + sym__definition, + sym_extensible_union, + sym_extend_decl, + sym_full_partial_type_definition, + sym_type_definition, + sym_def, + aux_sym_source_file_repeat1, + [5558] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(264), 12, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + anon_sym_def, + [5576] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(242), 1, + anon_sym_COLON, + ACTIONS(244), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5596] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(366), 1, + sym__identifier_tok, + STATE(160), 1, + sym_identifier, + STATE(145), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(175), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(177), 4, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [5622] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(246), 1, + anon_sym_COLON, + ACTIONS(248), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5642] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(250), 1, + anon_sym_COLON, + ACTIONS(252), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5662] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(254), 1, + anon_sym_COLON, + ACTIONS(256), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5682] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(322), 1, + anon_sym_COLON, + ACTIONS(324), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5702] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(360), 1, + anon_sym_DOT, + STATE(139), 1, + aux_sym_path_repeat1, + ACTIONS(187), 2, + sym__identifier_tok, + anon_sym_with, + ACTIONS(191), 8, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [5726] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(369), 1, + anon_sym_DOT, + STATE(151), 1, + aux_sym_path_repeat1, + ACTIONS(158), 2, + sym__identifier_tok, + anon_sym_with, + ACTIONS(160), 8, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_COLON, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [5750] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(290), 1, + anon_sym_COLON, + ACTIONS(292), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5770] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(270), 1, + anon_sym_COLON, + ACTIONS(272), 11, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + anon_sym_def, + [5790] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(372), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(374), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5809] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(376), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(378), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5828] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(380), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(382), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5847] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(384), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(386), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5866] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(224), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(228), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5885] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(388), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(390), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5904] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(392), 1, + anon_sym_DOT, + STATE(162), 1, + aux_sym_path_repeat1, + ACTIONS(191), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(187), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [5927] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(394), 4, + sym__identifier_tok, + anon_sym_let, + anon_sym_in, + anon_sym_await, + ACTIONS(396), 7, + anon_sym_LPAREN, + anon_sym_LBRACK, + anon_sym_LBRACE, + anon_sym_SQUOTE, + anon_sym_DQUOTE, + aux_sym_num_literal_token1, + aux_sym_num_literal_token2, + [5946] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(392), 1, + anon_sym_DOT, + STATE(163), 1, + aux_sym_path_repeat1, + ACTIONS(198), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(196), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [5969] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(398), 1, + anon_sym_DOT, + STATE(163), 1, + aux_sym_path_repeat1, + ACTIONS(160), 4, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + ACTIONS(158), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [5992] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(401), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(164), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(175), 6, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6014] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(164), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(181), 6, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6036] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(165), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(168), 6, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6058] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(165), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + ACTIONS(183), 6, + anon_sym_RPAREN, + anon_sym_PIPE, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6080] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(158), 5, + sym__identifier_tok, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + ACTIONS(160), 5, + ts_builtin_sym_end, + anon_sym_DOT, + anon_sym_EQ, + anon_sym_PIPE, + anon_sym_DASH_GT, + [6098] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(378), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6113] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(228), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6128] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(382), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6143] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(404), 1, + anon_sym_COLON, + ACTIONS(406), 1, + anon_sym_DASH_GT, + ACTIONS(208), 7, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_LPAREN, + anon_sym_COLON_COLON, + anon_sym_def, + [6162] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(386), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6177] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(390), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6192] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(396), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6207] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(374), 9, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_def, + [6222] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(344), 7, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_DASH_GT, + anon_sym_def, + [6238] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(332), 7, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_DASH_GT, + anon_sym_def, + [6254] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(328), 7, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_DASH_GT, + anon_sym_def, + [6270] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(410), 1, + anon_sym_LPAREN, + ACTIONS(412), 1, + anon_sym_COLON, + ACTIONS(414), 1, + anon_sym_COLON_COLON, + ACTIONS(228), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6290] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(418), 1, + anon_sym_EQ, + ACTIONS(420), 1, + anon_sym_DASH_GT, + ACTIONS(416), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6310] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(422), 1, + anon_sym_COLON, + ACTIONS(424), 1, + anon_sym_DASH_GT, + ACTIONS(208), 6, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + anon_sym_COLON_COLON, + [6328] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(216), 7, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_EQ, + anon_sym_DASH_GT, + anon_sym_def, + [6344] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(420), 1, + anon_sym_DASH_GT, + ACTIONS(426), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6361] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(420), 1, + anon_sym_DASH_GT, + ACTIONS(428), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6378] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(420), 1, + anon_sym_DASH_GT, + ACTIONS(430), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6395] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(410), 1, + anon_sym_LPAREN, + ACTIONS(432), 1, + anon_sym_COLON, + ACTIONS(434), 1, + anon_sym_COLON_COLON, + ACTIONS(228), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + [6414] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(420), 1, + anon_sym_DASH_GT, + ACTIONS(336), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6431] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(408), 1, + anon_sym_PIPE, + ACTIONS(420), 1, + anon_sym_DASH_GT, + ACTIONS(436), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6448] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(438), 1, + sym__identifier_tok, + STATE(190), 1, + aux_sym_record_type_repeat1, + STATE(305), 1, + sym_identifier, + STATE(319), 1, + sym_record_type_field, + ACTIONS(441), 2, + anon_sym_DOT_DOT_DOT, + anon_sym_RBRACE, + [6468] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(328), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6482] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + ACTIONS(336), 4, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_RBRACE, + [6498] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(332), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6512] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(216), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6526] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(344), 5, + anon_sym_RPAREN, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_DASH_GT, + anon_sym_RBRACE, + [6540] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(447), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(449), 1, + anon_sym_RBRACE, + STATE(190), 1, + aux_sym_record_type_repeat1, + STATE(269), 1, + sym_record_type_field, + STATE(305), 1, + sym_identifier, + [6562] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(451), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(453), 1, + anon_sym_RBRACE, + STATE(190), 1, + aux_sym_record_type_repeat1, + STATE(248), 1, + sym_record_type_field, + STATE(305), 1, + sym_identifier, + [6584] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(455), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(457), 1, + anon_sym_RBRACE, + STATE(196), 1, + aux_sym_record_type_repeat1, + STATE(262), 1, + sym_record_type_field, + STATE(305), 1, + sym_identifier, + [6606] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(459), 1, + anon_sym_DOT_DOT_DOT, + ACTIONS(461), 1, + anon_sym_RBRACE, + STATE(197), 1, + aux_sym_record_type_repeat1, + STATE(245), 1, + sym_record_type_field, + STATE(305), 1, + sym_identifier, + [6628] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(463), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6639] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(416), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6650] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(465), 1, + anon_sym_RBRACE, + STATE(209), 1, + aux_sym_record_expr_repeat1, + STATE(267), 1, + sym_record_expr_field, + STATE(299), 1, + sym_identifier, + [6669] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(467), 1, + sym__identifier_tok, + ACTIONS(470), 1, + anon_sym_RBRACE, + STATE(203), 1, + aux_sym_record_expr_repeat1, + STATE(299), 1, + sym_identifier, + STATE(318), 1, + sym_record_expr_field, + [6688] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + ACTIONS(472), 1, + anon_sym_COMMA, + ACTIONS(474), 1, + anon_sym_RBRACK, + STATE(234), 1, + aux_sym_multi_type_parameters_repeat1, + [6707] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(476), 1, + anon_sym_RBRACE, + STATE(208), 1, + aux_sym_record_expr_repeat1, + STATE(264), 1, + sym_record_expr_field, + STATE(299), 1, + sym_identifier, + [6726] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(478), 5, + ts_builtin_sym_end, + anon_sym_extensible, + anon_sym_extend, + anon_sym_type, + anon_sym_def, + [6737] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(480), 1, + anon_sym_QMARK, + STATE(211), 1, + aux_sym_type_definition_repeat1, + STATE(216), 1, + sym_identifier, + STATE(321), 1, + sym_path, + [6756] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(482), 1, + anon_sym_RBRACE, + STATE(203), 1, + aux_sym_record_expr_repeat1, + STATE(272), 1, + sym_record_expr_field, + STATE(299), 1, + sym_identifier, + [6775] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + ACTIONS(484), 1, + anon_sym_RBRACE, + STATE(203), 1, + aux_sym_record_expr_repeat1, + STATE(246), 1, + sym_record_expr_field, + STATE(299), 1, + sym_identifier, + [6794] = 5, + ACTIONS(486), 1, + sym_comment, + ACTIONS(488), 1, + sym_escape_sequence, + ACTIONS(490), 1, + sym_string_middle, + ACTIONS(492), 1, + anon_sym_DQUOTE, + STATE(218), 1, + aux_sym_string_literal_repeat1, + [6810] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(216), 1, + sym_identifier, + STATE(224), 1, + aux_sym_type_definition_repeat1, + STATE(312), 1, + sym_path, + [6826] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(494), 1, + sym__identifier_tok, + STATE(160), 1, + sym_identifier, + STATE(133), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + [6840] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(165), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + [6854] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + ACTIONS(496), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [6868] = 5, + ACTIONS(486), 1, + sym_comment, + ACTIONS(498), 1, + sym_escape_sequence, + ACTIONS(500), 1, + sym_string_middle, + ACTIONS(502), 1, + anon_sym_DQUOTE, + STATE(220), 1, + aux_sym_string_literal_repeat1, + [6884] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(191), 1, + anon_sym_EQ, + ACTIONS(360), 1, + anon_sym_DOT, + ACTIONS(504), 1, + sym__identifier_tok, + STATE(139), 1, + aux_sym_path_repeat1, + [6900] = 5, + ACTIONS(486), 1, + sym_comment, + ACTIONS(506), 1, + sym_escape_sequence, + ACTIONS(509), 1, + sym_string_middle, + ACTIONS(512), 1, + anon_sym_DQUOTE, + STATE(217), 1, + aux_sym_string_literal_repeat1, + [6916] = 5, + ACTIONS(486), 1, + sym_comment, + ACTIONS(514), 1, + sym_escape_sequence, + ACTIONS(516), 1, + sym_string_middle, + ACTIONS(518), 1, + anon_sym_DQUOTE, + STATE(217), 1, + aux_sym_string_literal_repeat1, + [6932] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + ACTIONS(520), 2, + anon_sym_COMMA, + anon_sym_RBRACK, + [6946] = 5, + ACTIONS(486), 1, + sym_comment, + ACTIONS(514), 1, + sym_escape_sequence, + ACTIONS(516), 1, + sym_string_middle, + ACTIONS(522), 1, + anon_sym_DQUOTE, + STATE(217), 1, + aux_sym_string_literal_repeat1, + [6962] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + sym__identifier_tok, + STATE(81), 1, + sym_identifier, + STATE(78), 2, + sym_path, + aux_sym_parametrized_type_repeat1, + [6976] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(494), 1, + sym__identifier_tok, + STATE(160), 1, + sym_identifier, + STATE(200), 1, + sym_path, + [6989] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(526), 1, + anon_sym_COMMA, + ACTIONS(529), 1, + anon_sym_COLON, + STATE(223), 1, + aux_sym_with_type_repeat1, + [7002] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(531), 1, + sym__identifier_tok, + STATE(224), 2, + sym_identifier, + aux_sym_type_definition_repeat1, + [7013] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(520), 1, + anon_sym_RBRACK, + ACTIONS(534), 1, + anon_sym_COMMA, + STATE(225), 1, + aux_sym_multi_type_parameters_repeat1, + [7026] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + ACTIONS(537), 1, + anon_sym_RPAREN, + [7039] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(276), 1, + sym_path, + [7052] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_COMMA, + ACTIONS(541), 1, + anon_sym_COLON, + STATE(233), 1, + aux_sym_with_type_repeat1, + [7065] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + ACTIONS(543), 1, + anon_sym_RPAREN, + [7078] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(300), 1, + sym_path, + [7091] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(150), 1, + sym_identifier, + STATE(313), 1, + sym_path, + [7104] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_COMMA, + ACTIONS(545), 1, + anon_sym_COLON, + STATE(223), 1, + aux_sym_with_type_repeat1, + [7117] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_COMMA, + ACTIONS(547), 1, + anon_sym_COLON, + STATE(223), 1, + aux_sym_with_type_repeat1, + [7130] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(472), 1, + anon_sym_COMMA, + ACTIONS(549), 1, + anon_sym_RBRACK, + STATE(225), 1, + aux_sym_multi_type_parameters_repeat1, + [7143] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_COMMA, + ACTIONS(551), 1, + anon_sym_COLON, + STATE(236), 1, + aux_sym_with_type_repeat1, + [7156] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_COMMA, + ACTIONS(553), 1, + anon_sym_COLON, + STATE(223), 1, + aux_sym_with_type_repeat1, + [7169] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 1, + anon_sym_COMMA, + ACTIONS(555), 1, + anon_sym_COLON, + STATE(232), 1, + aux_sym_with_type_repeat1, + [7182] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(441), 3, + sym__identifier_tok, + anon_sym_DOT_DOT_DOT, + anon_sym_RBRACE, + [7191] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(110), 1, + sym_identifier, + [7201] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(316), 1, + sym_identifier, + [7211] = 3, + ACTIONS(486), 1, + sym_comment, + ACTIONS(557), 1, + sym_escape_sequence, + ACTIONS(559), 1, + sym_char_middle, + [7221] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(470), 2, + sym__identifier_tok, + anon_sym_RBRACE, + [7229] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(116), 1, + anon_sym_QMARK, + STATE(295), 1, + sym_partial_type, + [7239] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(561), 2, + anon_sym_COMMA, + anon_sym_RBRACE, + [7247] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(453), 1, + anon_sym_RBRACE, + ACTIONS(563), 1, + anon_sym_COMMA, + [7257] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(565), 1, + anon_sym_COMMA, + ACTIONS(567), 1, + anon_sym_RBRACE, + [7267] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(152), 1, + sym_identifier, + [7277] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(563), 1, + anon_sym_COMMA, + ACTIONS(569), 1, + anon_sym_RBRACE, + [7287] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(571), 1, + anon_sym_RPAREN, + ACTIONS(573), 1, + anon_sym_COMMA, + [7297] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(237), 1, + sym_identifier, + [7307] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(494), 1, + sym__identifier_tok, + STATE(110), 1, + sym_identifier, + [7317] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(50), 1, + anon_sym_RBRACK, + ACTIONS(573), 1, + anon_sym_COMMA, + [7327] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + sym__identifier_tok, + STATE(125), 1, + sym_identifier, + [7337] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(50), 1, + sym_identifier, + [7347] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(273), 1, + sym_identifier, + [7357] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(146), 1, + anon_sym_QMARK, + STATE(128), 1, + sym_partial_type, + [7367] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(575), 1, + anon_sym_PIPE, + ACTIONS(577), 1, + anon_sym_DASH_GT, + [7377] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(443), 1, + anon_sym_PIPE, + ACTIONS(445), 1, + anon_sym_DASH_GT, + [7387] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(116), 1, + anon_sym_QMARK, + STATE(128), 1, + sym_partial_type, + [7397] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(73), 1, + sym_identifier, + [7407] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(68), 1, + anon_sym_RPAREN, + ACTIONS(573), 1, + anon_sym_COMMA, + [7417] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(449), 1, + anon_sym_RBRACE, + ACTIONS(563), 1, + anon_sym_COMMA, + [7427] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(74), 1, + anon_sym_RBRACK, + ACTIONS(573), 1, + anon_sym_COMMA, + [7437] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(482), 1, + anon_sym_RBRACE, + ACTIONS(565), 1, + anon_sym_COMMA, + [7447] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(307), 1, + sym_identifier, + [7457] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(317), 1, + sym_identifier, + [7467] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(484), 1, + anon_sym_RBRACE, + ACTIONS(565), 1, + anon_sym_COMMA, + [7477] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + sym__identifier_tok, + STATE(105), 1, + sym_identifier, + [7487] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(563), 1, + anon_sym_COMMA, + ACTIONS(579), 1, + anon_sym_RBRACE, + [7497] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(132), 1, + anon_sym_QMARK, + STATE(107), 1, + sym_partial_type, + [7507] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(573), 1, + anon_sym_COMMA, + ACTIONS(581), 1, + anon_sym_RBRACK, + [7517] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(565), 1, + anon_sym_COMMA, + ACTIONS(583), 1, + anon_sym_RBRACE, + [7527] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(529), 2, + anon_sym_COMMA, + anon_sym_COLON, + [7535] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(575), 1, + anon_sym_PIPE, + ACTIONS(585), 1, + anon_sym_DASH_GT, + [7545] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(66), 1, + anon_sym_RPAREN, + ACTIONS(573), 1, + anon_sym_COMMA, + [7555] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(587), 1, + anon_sym_EQ, + ACTIONS(589), 1, + anon_sym_COLON, + [7565] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(573), 1, + anon_sym_COMMA, + ACTIONS(591), 1, + anon_sym_RPAREN, + [7575] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(57), 1, + sym_identifier, + [7585] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(573), 1, + anon_sym_COMMA, + ACTIONS(593), 1, + anon_sym_RBRACK, + [7595] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(494), 1, + sym__identifier_tok, + STATE(152), 1, + sym_identifier, + [7605] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(494), 1, + sym__identifier_tok, + STATE(168), 1, + sym_identifier, + [7615] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + sym__identifier_tok, + STATE(73), 1, + sym_identifier, + [7625] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(575), 1, + anon_sym_PIPE, + ACTIONS(595), 1, + anon_sym_DASH_GT, + [7635] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(228), 1, + sym_identifier, + [7645] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(55), 1, + sym_identifier, + [7655] = 3, + ACTIONS(486), 1, + sym_comment, + ACTIONS(597), 1, + sym_escape_sequence, + ACTIONS(599), 1, + sym_char_middle, + [7665] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(116), 1, + anon_sym_QMARK, + STATE(308), 1, + sym_partial_type, + [7675] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(116), 1, + anon_sym_QMARK, + STATE(297), 1, + sym_partial_type, + [7685] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(235), 1, + sym_identifier, + [7695] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(310), 1, + sym_identifier, + [7705] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(311), 1, + sym_identifier, + [7715] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(162), 1, + sym__identifier_tok, + STATE(315), 1, + sym_identifier, + [7725] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(116), 1, + anon_sym_QMARK, + STATE(304), 1, + sym_partial_type, + [7735] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(601), 1, + sym__identifier_tok, + [7742] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(569), 1, + anon_sym_RBRACE, + [7749] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(603), 1, + anon_sym_RPAREN, + [7756] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(605), 1, + anon_sym_RBRACE, + [7763] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(607), 1, + ts_builtin_sym_end, + [7770] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(609), 1, + anon_sym_COLON, + [7777] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(611), 1, + anon_sym_with, + [7784] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(613), 1, + sym__identifier_tok, + [7791] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(615), 1, + anon_sym_SQUOTE, + [7798] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(573), 1, + anon_sym_COMMA, + [7805] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(617), 1, + anon_sym_RBRACE, + [7812] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(619), 1, + anon_sym_COLON, + [7819] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(621), 1, + anon_sym_union, + [7826] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(623), 1, + anon_sym_EQ, + [7833] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(579), 1, + anon_sym_RBRACE, + [7840] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(625), 1, + sym_tag, + [7847] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(627), 1, + anon_sym_EQ, + [7854] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(629), 1, + anon_sym_EQ, + [7861] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(631), 1, + anon_sym_EQ, + [7868] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(633), 1, + anon_sym_EQ, + [7875] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(635), 1, + anon_sym_RPAREN, + [7882] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(637), 1, + anon_sym_EQ, + [7889] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(639), 1, + anon_sym_EQ, + [7896] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(641), 1, + anon_sym_EQ, + [7903] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(565), 1, + anon_sym_COMMA, + [7910] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(563), 1, + anon_sym_COMMA, + [7917] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(643), 1, + anon_sym_SQUOTE, + [7924] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(645), 1, + anon_sym_EQ, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 62, + [SMALL_STATE(4)] = 123, + [SMALL_STATE(5)] = 184, + [SMALL_STATE(6)] = 245, + [SMALL_STATE(7)] = 306, + [SMALL_STATE(8)] = 367, + [SMALL_STATE(9)] = 428, + [SMALL_STATE(10)] = 489, + [SMALL_STATE(11)] = 550, + [SMALL_STATE(12)] = 608, + [SMALL_STATE(13)] = 666, + [SMALL_STATE(14)] = 724, + [SMALL_STATE(15)] = 782, + [SMALL_STATE(16)] = 840, + [SMALL_STATE(17)] = 898, + [SMALL_STATE(18)] = 953, + [SMALL_STATE(19)] = 1008, + [SMALL_STATE(20)] = 1063, + [SMALL_STATE(21)] = 1118, + [SMALL_STATE(22)] = 1175, + [SMALL_STATE(23)] = 1230, + [SMALL_STATE(24)] = 1285, + [SMALL_STATE(25)] = 1340, + [SMALL_STATE(26)] = 1395, + [SMALL_STATE(27)] = 1450, + [SMALL_STATE(28)] = 1505, + [SMALL_STATE(29)] = 1562, + [SMALL_STATE(30)] = 1617, + [SMALL_STATE(31)] = 1672, + [SMALL_STATE(32)] = 1727, + [SMALL_STATE(33)] = 1782, + [SMALL_STATE(34)] = 1837, + [SMALL_STATE(35)] = 1892, + [SMALL_STATE(36)] = 1949, + [SMALL_STATE(37)] = 2004, + [SMALL_STATE(38)] = 2059, + [SMALL_STATE(39)] = 2114, + [SMALL_STATE(40)] = 2169, + [SMALL_STATE(41)] = 2224, + [SMALL_STATE(42)] = 2279, + [SMALL_STATE(43)] = 2334, + [SMALL_STATE(44)] = 2388, + [SMALL_STATE(45)] = 2442, + [SMALL_STATE(46)] = 2496, + [SMALL_STATE(47)] = 2550, + [SMALL_STATE(48)] = 2604, + [SMALL_STATE(49)] = 2658, + [SMALL_STATE(50)] = 2712, + [SMALL_STATE(51)] = 2766, + [SMALL_STATE(52)] = 2820, + [SMALL_STATE(53)] = 2874, + [SMALL_STATE(54)] = 2928, + [SMALL_STATE(55)] = 2982, + [SMALL_STATE(56)] = 3036, + [SMALL_STATE(57)] = 3090, + [SMALL_STATE(58)] = 3144, + [SMALL_STATE(59)] = 3198, + [SMALL_STATE(60)] = 3252, + [SMALL_STATE(61)] = 3306, + [SMALL_STATE(62)] = 3360, + [SMALL_STATE(63)] = 3414, + [SMALL_STATE(64)] = 3468, + [SMALL_STATE(65)] = 3524, + [SMALL_STATE(66)] = 3578, + [SMALL_STATE(67)] = 3632, + [SMALL_STATE(68)] = 3686, + [SMALL_STATE(69)] = 3740, + [SMALL_STATE(70)] = 3796, + [SMALL_STATE(71)] = 3852, + [SMALL_STATE(72)] = 3902, + [SMALL_STATE(73)] = 3951, + [SMALL_STATE(74)] = 3980, + [SMALL_STATE(75)] = 4025, + [SMALL_STATE(76)] = 4051, + [SMALL_STATE(77)] = 4081, + [SMALL_STATE(78)] = 4111, + [SMALL_STATE(79)] = 4139, + [SMALL_STATE(80)] = 4169, + [SMALL_STATE(81)] = 4193, + [SMALL_STATE(82)] = 4220, + [SMALL_STATE(83)] = 4247, + [SMALL_STATE(84)] = 4274, + [SMALL_STATE(85)] = 4298, + [SMALL_STATE(86)] = 4324, + [SMALL_STATE(87)] = 4347, + [SMALL_STATE(88)] = 4368, + [SMALL_STATE(89)] = 4395, + [SMALL_STATE(90)] = 4416, + [SMALL_STATE(91)] = 4437, + [SMALL_STATE(92)] = 4458, + [SMALL_STATE(93)] = 4479, + [SMALL_STATE(94)] = 4500, + [SMALL_STATE(95)] = 4521, + [SMALL_STATE(96)] = 4542, + [SMALL_STATE(97)] = 4563, + [SMALL_STATE(98)] = 4584, + [SMALL_STATE(99)] = 4605, + [SMALL_STATE(100)] = 4626, + [SMALL_STATE(101)] = 4647, + [SMALL_STATE(102)] = 4668, + [SMALL_STATE(103)] = 4689, + [SMALL_STATE(104)] = 4710, + [SMALL_STATE(105)] = 4731, + [SMALL_STATE(106)] = 4752, + [SMALL_STATE(107)] = 4773, + [SMALL_STATE(108)] = 4794, + [SMALL_STATE(109)] = 4815, + [SMALL_STATE(110)] = 4836, + [SMALL_STATE(111)] = 4857, + [SMALL_STATE(112)] = 4878, + [SMALL_STATE(113)] = 4899, + [SMALL_STATE(114)] = 4920, + [SMALL_STATE(115)] = 4941, + [SMALL_STATE(116)] = 4962, + [SMALL_STATE(117)] = 4983, + [SMALL_STATE(118)] = 5004, + [SMALL_STATE(119)] = 5025, + [SMALL_STATE(120)] = 5048, + [SMALL_STATE(121)] = 5071, + [SMALL_STATE(122)] = 5096, + [SMALL_STATE(123)] = 5119, + [SMALL_STATE(124)] = 5142, + [SMALL_STATE(125)] = 5163, + [SMALL_STATE(126)] = 5184, + [SMALL_STATE(127)] = 5204, + [SMALL_STATE(128)] = 5224, + [SMALL_STATE(129)] = 5242, + [SMALL_STATE(130)] = 5262, + [SMALL_STATE(131)] = 5282, + [SMALL_STATE(132)] = 5308, + [SMALL_STATE(133)] = 5334, + [SMALL_STATE(134)] = 5360, + [SMALL_STATE(135)] = 5378, + [SMALL_STATE(136)] = 5398, + [SMALL_STATE(137)] = 5426, + [SMALL_STATE(138)] = 5446, + [SMALL_STATE(139)] = 5466, + [SMALL_STATE(140)] = 5490, + [SMALL_STATE(141)] = 5510, + [SMALL_STATE(142)] = 5530, + [SMALL_STATE(143)] = 5558, + [SMALL_STATE(144)] = 5576, + [SMALL_STATE(145)] = 5596, + [SMALL_STATE(146)] = 5622, + [SMALL_STATE(147)] = 5642, + [SMALL_STATE(148)] = 5662, + [SMALL_STATE(149)] = 5682, + [SMALL_STATE(150)] = 5702, + [SMALL_STATE(151)] = 5726, + [SMALL_STATE(152)] = 5750, + [SMALL_STATE(153)] = 5770, + [SMALL_STATE(154)] = 5790, + [SMALL_STATE(155)] = 5809, + [SMALL_STATE(156)] = 5828, + [SMALL_STATE(157)] = 5847, + [SMALL_STATE(158)] = 5866, + [SMALL_STATE(159)] = 5885, + [SMALL_STATE(160)] = 5904, + [SMALL_STATE(161)] = 5927, + [SMALL_STATE(162)] = 5946, + [SMALL_STATE(163)] = 5969, + [SMALL_STATE(164)] = 5992, + [SMALL_STATE(165)] = 6014, + [SMALL_STATE(166)] = 6036, + [SMALL_STATE(167)] = 6058, + [SMALL_STATE(168)] = 6080, + [SMALL_STATE(169)] = 6098, + [SMALL_STATE(170)] = 6113, + [SMALL_STATE(171)] = 6128, + [SMALL_STATE(172)] = 6143, + [SMALL_STATE(173)] = 6162, + [SMALL_STATE(174)] = 6177, + [SMALL_STATE(175)] = 6192, + [SMALL_STATE(176)] = 6207, + [SMALL_STATE(177)] = 6222, + [SMALL_STATE(178)] = 6238, + [SMALL_STATE(179)] = 6254, + [SMALL_STATE(180)] = 6270, + [SMALL_STATE(181)] = 6290, + [SMALL_STATE(182)] = 6310, + [SMALL_STATE(183)] = 6328, + [SMALL_STATE(184)] = 6344, + [SMALL_STATE(185)] = 6361, + [SMALL_STATE(186)] = 6378, + [SMALL_STATE(187)] = 6395, + [SMALL_STATE(188)] = 6414, + [SMALL_STATE(189)] = 6431, + [SMALL_STATE(190)] = 6448, + [SMALL_STATE(191)] = 6468, + [SMALL_STATE(192)] = 6482, + [SMALL_STATE(193)] = 6498, + [SMALL_STATE(194)] = 6512, + [SMALL_STATE(195)] = 6526, + [SMALL_STATE(196)] = 6540, + [SMALL_STATE(197)] = 6562, + [SMALL_STATE(198)] = 6584, + [SMALL_STATE(199)] = 6606, + [SMALL_STATE(200)] = 6628, + [SMALL_STATE(201)] = 6639, + [SMALL_STATE(202)] = 6650, + [SMALL_STATE(203)] = 6669, + [SMALL_STATE(204)] = 6688, + [SMALL_STATE(205)] = 6707, + [SMALL_STATE(206)] = 6726, + [SMALL_STATE(207)] = 6737, + [SMALL_STATE(208)] = 6756, + [SMALL_STATE(209)] = 6775, + [SMALL_STATE(210)] = 6794, + [SMALL_STATE(211)] = 6810, + [SMALL_STATE(212)] = 6826, + [SMALL_STATE(213)] = 6840, + [SMALL_STATE(214)] = 6854, + [SMALL_STATE(215)] = 6868, + [SMALL_STATE(216)] = 6884, + [SMALL_STATE(217)] = 6900, + [SMALL_STATE(218)] = 6916, + [SMALL_STATE(219)] = 6932, + [SMALL_STATE(220)] = 6946, + [SMALL_STATE(221)] = 6962, + [SMALL_STATE(222)] = 6976, + [SMALL_STATE(223)] = 6989, + [SMALL_STATE(224)] = 7002, + [SMALL_STATE(225)] = 7013, + [SMALL_STATE(226)] = 7026, + [SMALL_STATE(227)] = 7039, + [SMALL_STATE(228)] = 7052, + [SMALL_STATE(229)] = 7065, + [SMALL_STATE(230)] = 7078, + [SMALL_STATE(231)] = 7091, + [SMALL_STATE(232)] = 7104, + [SMALL_STATE(233)] = 7117, + [SMALL_STATE(234)] = 7130, + [SMALL_STATE(235)] = 7143, + [SMALL_STATE(236)] = 7156, + [SMALL_STATE(237)] = 7169, + [SMALL_STATE(238)] = 7182, + [SMALL_STATE(239)] = 7191, + [SMALL_STATE(240)] = 7201, + [SMALL_STATE(241)] = 7211, + [SMALL_STATE(242)] = 7221, + [SMALL_STATE(243)] = 7229, + [SMALL_STATE(244)] = 7239, + [SMALL_STATE(245)] = 7247, + [SMALL_STATE(246)] = 7257, + [SMALL_STATE(247)] = 7267, + [SMALL_STATE(248)] = 7277, + [SMALL_STATE(249)] = 7287, + [SMALL_STATE(250)] = 7297, + [SMALL_STATE(251)] = 7307, + [SMALL_STATE(252)] = 7317, + [SMALL_STATE(253)] = 7327, + [SMALL_STATE(254)] = 7337, + [SMALL_STATE(255)] = 7347, + [SMALL_STATE(256)] = 7357, + [SMALL_STATE(257)] = 7367, + [SMALL_STATE(258)] = 7377, + [SMALL_STATE(259)] = 7387, + [SMALL_STATE(260)] = 7397, + [SMALL_STATE(261)] = 7407, + [SMALL_STATE(262)] = 7417, + [SMALL_STATE(263)] = 7427, + [SMALL_STATE(264)] = 7437, + [SMALL_STATE(265)] = 7447, + [SMALL_STATE(266)] = 7457, + [SMALL_STATE(267)] = 7467, + [SMALL_STATE(268)] = 7477, + [SMALL_STATE(269)] = 7487, + [SMALL_STATE(270)] = 7497, + [SMALL_STATE(271)] = 7507, + [SMALL_STATE(272)] = 7517, + [SMALL_STATE(273)] = 7527, + [SMALL_STATE(274)] = 7535, + [SMALL_STATE(275)] = 7545, + [SMALL_STATE(276)] = 7555, + [SMALL_STATE(277)] = 7565, + [SMALL_STATE(278)] = 7575, + [SMALL_STATE(279)] = 7585, + [SMALL_STATE(280)] = 7595, + [SMALL_STATE(281)] = 7605, + [SMALL_STATE(282)] = 7615, + [SMALL_STATE(283)] = 7625, + [SMALL_STATE(284)] = 7635, + [SMALL_STATE(285)] = 7645, + [SMALL_STATE(286)] = 7655, + [SMALL_STATE(287)] = 7665, + [SMALL_STATE(288)] = 7675, + [SMALL_STATE(289)] = 7685, + [SMALL_STATE(290)] = 7695, + [SMALL_STATE(291)] = 7705, + [SMALL_STATE(292)] = 7715, + [SMALL_STATE(293)] = 7725, + [SMALL_STATE(294)] = 7735, + [SMALL_STATE(295)] = 7742, + [SMALL_STATE(296)] = 7749, + [SMALL_STATE(297)] = 7756, + [SMALL_STATE(298)] = 7763, + [SMALL_STATE(299)] = 7770, + [SMALL_STATE(300)] = 7777, + [SMALL_STATE(301)] = 7784, + [SMALL_STATE(302)] = 7791, + [SMALL_STATE(303)] = 7798, + [SMALL_STATE(304)] = 7805, + [SMALL_STATE(305)] = 7812, + [SMALL_STATE(306)] = 7819, + [SMALL_STATE(307)] = 7826, + [SMALL_STATE(308)] = 7833, + [SMALL_STATE(309)] = 7840, + [SMALL_STATE(310)] = 7847, + [SMALL_STATE(311)] = 7854, + [SMALL_STATE(312)] = 7861, + [SMALL_STATE(313)] = 7868, + [SMALL_STATE(314)] = 7875, + [SMALL_STATE(315)] = 7882, + [SMALL_STATE(316)] = 7889, + [SMALL_STATE(317)] = 7896, + [SMALL_STATE(318)] = 7903, + [SMALL_STATE(319)] = 7910, + [SMALL_STATE(320)] = 7917, + [SMALL_STATE(321)] = 7924, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), + [15] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(75), + [18] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(40), + [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), + [23] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(7), + [26] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(202), + [29] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(241), + [32] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(215), + [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(122), + [38] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(290), + [41] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(291), + [44] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), + [46] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), + [52] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), + [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [58] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [60] = {.entry = {.count = 1, .reusable = false}}, SHIFT(290), + [62] = {.entry = {.count = 1, .reusable = false}}, SHIFT(291), + [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [68] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), + [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [74] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [76] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), + [78] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), + [80] = {.entry = {.count = 1, .reusable = false}}, SHIFT(265), + [82] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [84] = {.entry = {.count = 1, .reusable = false}}, SHIFT(266), + [86] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [88] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [92] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), + [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), + [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [106] = {.entry = {.count = 1, .reusable = false}}, SHIFT(292), + [108] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(240), + [112] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [114] = {.entry = {.count = 1, .reusable = false}}, SHIFT(284), + [116] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [118] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), + [128] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [130] = {.entry = {.count = 1, .reusable = false}}, SHIFT(289), + [132] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [140] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), + [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [144] = {.entry = {.count = 1, .reusable = false}}, SHIFT(250), + [146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), + [154] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tagged_type, 1, 0, 0), + [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tagged_type, 1, 0, 0), + [158] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_path_repeat1, 2, 0, 0), + [160] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_path_repeat1, 2, 0, 0), + [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1, 0, 0), + [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), + [168] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_non_fn, 1, 0, 0), + [170] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_non_fn, 1, 0, 0), + [172] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_parametrized_type_repeat1, 2, 0, 0), SHIFT_REPEAT(80), + [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parametrized_type_repeat1, 2, 0, 0), + [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_parametrized_type_repeat1, 2, 0, 0), + [179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parametrized_type, 2, 0, 0), + [181] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parametrized_type, 2, 0, 0), + [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tagged_type, 2, 0, 0), + [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tagged_type, 2, 0, 0), + [187] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_path, 1, 0, 0), + [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_path, 1, 0, 0), + [193] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_path_repeat1, 2, 0, 0), SHIFT_REPEAT(282), + [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_path, 2, 0, 0), + [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_path, 2, 0, 0), + [200] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_num_literal, 1, 0, 0), + [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_num_literal, 1, 0, 0), + [204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ident_expr, 1, 0, 0), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ident_expr, 1, 0, 0), + [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [212] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_with_type, 4, 0, 0), + [216] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_type, 4, 0, 0), + [218] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_atom, 3, 0, 0), + [222] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_atom, 3, 0, 0), + [224] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1, 0, 0), + [226] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [228] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1, 0, 0), + [230] = {.entry = {.count = 1, .reusable = false}}, SHIFT(268), + [232] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [234] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_just_type, 1, 0, 0), + [236] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_just_type, 1, 0, 0), + [238] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_type, 2, 0, 0), + [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 2, 0, 0), + [242] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_expression, 2, 0, 0), + [244] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 2, 0, 0), + [246] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expr, 2, 0, 0), + [248] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expr, 2, 0, 0), + [250] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 2, 0, 0), + [252] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 2, 0, 0), + [254] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_num_literal, 2, 0, 0), + [256] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_num_literal, 2, 0, 0), + [258] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_type, 3, 0, 0), + [260] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 3, 0, 0), + [262] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_union_type, 3, 0, 0), + [264] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_union_type, 3, 0, 0), + [266] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__atom, 3, 0, 0), + [268] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__atom, 3, 0, 0), + [270] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_expression, 3, 0, 0), + [272] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 3, 0, 0), + [274] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expr, 3, 0, 0), + [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expr, 3, 0, 0), + [278] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_char_literal, 3, 0, 0), + [280] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_char_literal, 3, 0, 0), + [282] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string_literal, 3, 0, 0), + [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string_literal, 3, 0, 0), + [286] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, 0, 0), + [288] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, 0, 0), + [290] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_access, 3, 0, 0), + [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_access, 3, 0, 0), + [294] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_type, 4, 0, 0), + [296] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 4, 0, 0), + [298] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_partial_union_type, 4, 0, 0), + [300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_partial_union_type, 4, 0, 0), + [302] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_expression, 4, 0, 0), + [304] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_expression, 4, 0, 0), + [306] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_expr, 4, 0, 0), + [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expr, 4, 0, 0), + [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_partial_type, 2, 0, 0), + [312] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_partial_type, 2, 0, 0), + [314] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, 0, 0), + [316] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, 0, 0), + [318] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_record_type, 5, 0, 0), + [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type, 5, 0, 0), + [322] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, 0, 0), + [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, 0, 0), + [326] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_recursive_type, 3, 0, 0), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_recursive_type, 3, 0, 0), + [330] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_fn_type, 3, 0, 0), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_fn_type, 3, 0, 0), + [334] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_downcast, 3, 0, 0), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_downcast, 3, 0, 0), + [338] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [340] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [342] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_with_type, 5, 0, 0), + [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_with_type, 5, 0, 0), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [348] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(306), + [351] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(230), + [354] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(207), + [357] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(227), + [360] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), + [362] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_list_expression_repeat1, 2, 0, 0), + [364] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [366] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_parametrized_type_repeat1, 2, 0, 0), SHIFT_REPEAT(124), + [369] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_path_repeat1, 2, 0, 0), SHIFT_REPEAT(260), + [372] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_binding, 6, 0, 0), + [374] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_binding, 6, 0, 0), + [376] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_binding, 5, 0, 0), + [378] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_binding, 5, 0, 0), + [380] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_binding, 5, 0, 0), + [382] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_binding, 5, 0, 0), + [384] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_lambda, 5, 0, 0), + [386] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda, 5, 0, 0), + [388] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_let_binding, 6, 0, 0), + [390] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_let_binding, 6, 0, 0), + [392] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), + [394] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_lambda, 3, 0, 0), + [396] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_lambda, 3, 0, 0), + [398] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_path_repeat1, 2, 0, 0), SHIFT_REPEAT(281), + [401] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parametrized_type_repeat1, 2, 0, 0), SHIFT_REPEAT(75), + [404] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [406] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [408] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [410] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [412] = {.entry = {.count = 1, .reusable = false}}, SHIFT(280), + [414] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_def, 4, 0, 0), + [418] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [420] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [422] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [424] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [426] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 4, 0, 0), + [428] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_extend_decl, 5, 0, 0), + [430] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_full_partial_type_definition, 5, 0, 0), + [432] = {.entry = {.count = 1, .reusable = false}}, SHIFT(247), + [434] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [436] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_definition, 5, 0, 0), + [438] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, 0, 0), SHIFT_REPEAT(75), + [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_type_repeat1, 2, 0, 0), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [463] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_extensible_union, 3, 0, 0), + [465] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [467] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_record_expr_repeat1, 2, 0, 0), SHIFT_REPEAT(75), + [470] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_record_expr_repeat1, 2, 0, 0), + [472] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [474] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [476] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [478] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_def, 6, 0, 0), + [480] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), + [482] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [484] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [486] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [488] = {.entry = {.count = 1, .reusable = true}}, SHIFT(218), + [490] = {.entry = {.count = 1, .reusable = false}}, SHIFT(218), + [492] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [494] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [496] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_type_field, 3, 0, 0), + [498] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [500] = {.entry = {.count = 1, .reusable = false}}, SHIFT(220), + [502] = {.entry = {.count = 1, .reusable = false}}, SHIFT(147), + [504] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat1, 1, 0, 0), + [506] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_literal_repeat1, 2, 0, 0), SHIFT_REPEAT(217), + [509] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2, 0, 0), SHIFT_REPEAT(217), + [512] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_literal_repeat1, 2, 0, 0), + [514] = {.entry = {.count = 1, .reusable = true}}, SHIFT(217), + [516] = {.entry = {.count = 1, .reusable = false}}, SHIFT(217), + [518] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), + [520] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_multi_type_parameters_repeat1, 2, 0, 0), + [522] = {.entry = {.count = 1, .reusable = false}}, SHIFT(137), + [524] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [526] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_with_type_repeat1, 2, 0, 0), SHIFT_REPEAT(255), + [529] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_with_type_repeat1, 2, 0, 0), + [531] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(75), + [534] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_multi_type_parameters_repeat1, 2, 0, 0), SHIFT_REPEAT(68), + [537] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), + [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [543] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [547] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [549] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [551] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [553] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [555] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [557] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [559] = {.entry = {.count = 1, .reusable = false}}, SHIFT(320), + [561] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_record_expr_field, 3, 0, 0), + [563] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), + [565] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), + [567] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [569] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [571] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [573] = {.entry = {.count = 1, .reusable = true}}, SHIFT(140), + [575] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type, 1, 0, 0), + [577] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [579] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [581] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [583] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [585] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [587] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [589] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [591] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [593] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [595] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [597] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [599] = {.entry = {.count = 1, .reusable = false}}, SHIFT(302), + [601] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multi_type_parameters, 4, 0, 0), + [603] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [605] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [607] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [609] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [611] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [613] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_multi_type_parameters, 3, 0, 0), + [615] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [617] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [625] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), + [633] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(42), + [641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [643] = {.entry = {.count = 1, .reusable = true}}, SHIFT(141), + [645] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), +}; + +#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_crepuscular(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, + .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__identifier_tok, + .primary_state_ids = ts_primary_state_ids, + .name = "crepuscular", + .reserved_words = &ts_reserved_words[0][0], + .max_reserved_word_set_size = 6, + .metadata = { + .major_version = 0, + .minor_version = 1, + .patch_version = 0, + }, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/tree-sitter/src/tree_sitter/alloc.h b/tree-sitter/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1abdd12 --- /dev/null +++ b/tree-sitter/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/tree-sitter/src/tree_sitter/array.h b/tree-sitter/src/tree_sitter/array.h new file mode 100644 index 0000000..a17a574 --- /dev/null +++ b/tree-sitter/src/tree_sitter/array.h @@ -0,0 +1,291 @@ +#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) \ + _array__reserve((Array *)(self), 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) _array__delete((Array *)(self)) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + (_array__grow((Array *)(self), 1, array_elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + _array__grow((Array *)(self), 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, contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), (self)->size, \ + 0, count, 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) \ + _array__splice( \ + (Array *)(self), 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) \ + _array__splice((Array *)(self), 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((Array *)(self), 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) \ + _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) + +/// Swap one array with another +#define array_swap(self, other) \ + _array__swap((Array *)(self), (Array *)(other)) + +/// 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 + +typedef Array(void) Array; + +/// This is not what you're looking for, see `array_delete`. +static inline void _array__delete(Array *self) { + if (self->contents) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; + } +} + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(Array *self, size_t element_size, + uint32_t index) { + assert(index < self->size); + char *contents = (char *)self->contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (self->size - index - 1) * element_size); + self->size--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { + if (new_capacity > self->capacity) { + if (self->contents) { + self->contents = ts_realloc(self->contents, new_capacity * element_size); + } else { + self->contents = ts_malloc(new_capacity * element_size); + } + self->capacity = new_capacity; + } +} + +/// This is not what you're looking for, see `array_assign`. +static inline void _array__assign(Array *self, const Array *other, size_t element_size) { + _array__reserve(self, element_size, other->size); + self->size = other->size; + memcpy(self->contents, other->contents, self->size * element_size); +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(Array *self, Array *other) { + Array swap = *other; + *other = *self; + *self = swap; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { + uint32_t new_size = self->size + count; + if (new_size > self->capacity) { + uint32_t new_capacity = self->capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + _array__reserve(self, element_size, new_capacity); + } +} + +/// This is not what you're looking for, see `array_splice`. +static inline void _array__splice(Array *self, size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = self->size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= self->size); + + _array__reserve(self, element_size, new_size); + + char *contents = (char *)self->contents; + if (self->size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (self->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 + ); + } + } + self->size += new_count - old_count; +} + +/// 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/tree-sitter/src/tree_sitter/parser.h b/tree-sitter/src/tree_sitter/parser.h new file mode 100644 index 0000000..858107d --- /dev/null +++ b/tree-sitter/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/tree-sitter/tree-sitter.json b/tree-sitter/tree-sitter.json new file mode 100644 index 0000000..e5d8f1a --- /dev/null +++ b/tree-sitter/tree-sitter.json @@ -0,0 +1,40 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/config.schema.json", + "grammars": [ + { + "name": "crepuscular", + "camelcase": "Crepuscular", + "title": "Crepuscular", + "scope": "source.crepuscular", + "file-types": [ + "crr" + ], + "injection-regex": "^crepuscular$", + "class-name": "TreeSitterCrepuscular" + } + ], + "metadata": { + "version": "0.1.0", + "license": "MIT", + "description": "Parser for the Crepuscular(ray) functional programming language", + "authors": [ + { + "name": "Alexander Nutz", + "email": "alexander.nutz@vxcc.dev", + "url": "https://alex.vxcc.dev/" + } + ], + "links": { + "repository": "https://gitea.vxcc.dev/alexander.nutz/beginner-friendly-lang" + } + }, + "bindings": { + "c": true, + "go": true, + "node": true, + "python": true, + "rust": true, + "swift": true, + "zig": false + } +} \ No newline at end of file