From 11cdad83a13cf1b75e26a9c3a835c81778adabab Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Sat, 30 Mar 2024 14:51:53 -0400 Subject: [PATCH] grammar: fix more `format` related edge-cases --- .editorconfig | 39 + .vscode/settings.json | 3 + Makefile | 109 ++ Package.swift | 48 + binding.gyp | 12 +- bindings/c/tree-sitter-opengoal.h | 16 + bindings/c/tree-sitter-opengoal.pc.in | 11 + bindings/go/binding.go | 13 + bindings/go/binding_test.go | 15 + bindings/go/go.mod | 5 + bindings/node/binding.cc | 36 +- bindings/node/index.d.ts | 28 + bindings/node/index.js | 18 +- .../python/tree_sitter_opengoal/__init__.py | 5 + .../python/tree_sitter_opengoal/__init__.pyi | 1 + .../python/tree_sitter_opengoal/binding.c | 27 + bindings/python/tree_sitter_opengoal/py.typed | 0 bindings/swift/TreeSitterOpengoal/opengoal.h | 16 + grammar.js | 5 +- package.json | 40 +- pyproject.toml | 29 + setup.py | 57 + src/grammar.json | 4 +- src/parser.c | 1467 +++++++++-------- src/tree_sitter/alloc.h | 54 + src/tree_sitter/array.h | 287 ++++ src/tree_sitter/parser.h | 16 +- yarn.lock | 263 ++- 28 files changed, 1869 insertions(+), 755 deletions(-) create mode 100644 .editorconfig create mode 100644 .vscode/settings.json create mode 100644 Makefile create mode 100644 Package.swift create mode 100644 bindings/c/tree-sitter-opengoal.h create mode 100644 bindings/c/tree-sitter-opengoal.pc.in create mode 100644 bindings/go/binding.go create mode 100644 bindings/go/binding_test.go create mode 100644 bindings/go/go.mod create mode 100644 bindings/node/index.d.ts create mode 100644 bindings/python/tree_sitter_opengoal/__init__.py create mode 100644 bindings/python/tree_sitter_opengoal/__init__.pyi create mode 100644 bindings/python/tree_sitter_opengoal/binding.c create mode 100644 bindings/python/tree_sitter_opengoal/py.typed create mode 100644 bindings/swift/TreeSitterOpengoal/opengoal.h create mode 100644 pyproject.toml create mode 100644 setup.py create mode 100644 src/tree_sitter/alloc.h create mode 100644 src/tree_sitter/array.h diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d3a8b5b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,39 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{c,cc,h}] +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 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cad7657 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.configureOnOpen": false +} \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1c34e24 --- /dev/null +++ b/Makefile @@ -0,0 +1,109 @@ +VERSION := 0.0.1 + +LANGUAGE_NAME := tree-sitter-opengoal + +# repository +SRC_DIR := src + +PARSER_REPO_URL := $(shell git -C $(SRC_DIR) remote get-url origin 2>/dev/null) + +ifeq ($(PARSER_URL),) + PARSER_URL := $(subst .git,,$(PARSER_REPO_URL)) +ifeq ($(shell echo $(PARSER_URL) | grep '^[a-z][-+.0-9a-z]*://'),) + PARSER_URL := $(subst :,/,$(PARSER_URL)) + PARSER_URL := $(subst git@,https://,$(PARSER_URL)) +endif +endif + +TS ?= tree-sitter + +# ABI versioning +SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) +SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) + +# install directory layout +PREFIX ?= /usr/local +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# object files +OBJS := $(patsubst %.c,%.o,$(wildcard $(SRC_DIR)/*.c)) + +# flags +ARFLAGS := rcs +override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC + +# OS-specific bits +ifeq ($(OS),Windows_NT) + $(error "Windows is not supported") +else ifeq ($(shell uname),Darwin) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib + LINKSHARED := $(LINKSHARED)-dynamiclib -Wl, + ifneq ($(ADDITIONAL_LIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS), + endif + LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks +else + SOEXT = so + SOEXTVER_MAJOR = so.$(SONAME_MAJOR) + SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED := $(LINKSHARED)-shared -Wl, + ifneq ($(ADDITIONAL_LIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS) + endif + LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).so.$(SONAME_MAJOR) +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|@URL@|$(PARSER_URL)|' \ + -e 's|@VERSION@|$(VERSION)|' \ + -e 's|@LIBDIR@|$(LIBDIR)|' \ + -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ + -e 's|@REQUIRES@|$(REQUIRES)|' \ + -e 's|@ADDITIONAL_LIBS@|$(ADDITIONAL_LIBS)|' \ + -e 's|=$(PREFIX)|=$${prefix}|' \ + -e 's|@PREFIX@|$(PREFIX)|' $< > $@ + +$(SRC_DIR)/parser.c: grammar.js + $(TS) generate --no-bindings + +install: all + install -Dm644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -Dm644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + install -Dm755 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) + +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 + +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/Package.swift b/Package.swift new file mode 100644 index 0000000..b6edf8d --- /dev/null +++ b/Package.swift @@ -0,0 +1,48 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterOpengoal", + platforms: [.macOS(.v10_13), .iOS(.v11)], + products: [ + .library(name: "TreeSitterOpengoal", targets: ["TreeSitterOpengoal"]), + ], + dependencies: [], + targets: [ + .target(name: "TreeSitterOpengoal", + path: ".", + exclude: [ + "Cargo.toml", + "Makefile", + "binding.gyp", + "bindings/c", + "bindings/go", + "bindings/node", + "bindings/python", + "bindings/rust", + "prebuilds", + "grammar.js", + "package.json", + "package-lock.json", + "pyproject.toml", + "setup.py", + "test", + "examples", + ".editorconfig", + ".github", + ".gitignore", + ".gitattributes", + ".gitmodules", + ], + sources: [ + "src/parser.c", + // NOTE: if your language has an external scanner, add it here. + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")]) + ], + cLanguageStandard: .c11 +) diff --git a/binding.gyp b/binding.gyp index 9f95c90..bcf4272 100644 --- a/binding.gyp +++ b/binding.gyp @@ -2,18 +2,20 @@ "targets": [ { "target_name": "tree_sitter_opengoal_binding", + "dependencies": [ + " -#include "nan.h" +#include -using namespace v8; +typedef struct TSLanguage TSLanguage; -extern "C" TSLanguage * tree_sitter_opengoal(); +extern "C" TSLanguage *tree_sitter_opengoal(); -namespace { +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_opengoal()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("opengoal").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "opengoal"); + auto language = Napi::External::New(env, tree_sitter_opengoal()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; } -NODE_MODULE(tree_sitter_opengoal_binding, Init) - -} // namespace +NODE_API_MODULE(tree_sitter_opengoal_binding, Init) diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts new file mode 100644 index 0000000..efe259e --- /dev/null +++ b/bindings/node/index.d.ts @@ -0,0 +1,28 @@ +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 = { + name: string; + language: unknown; + nodeTypeInfo: NodeInfo[]; +}; + +declare const language: Language; +export = language; diff --git a/bindings/node/index.js b/bindings/node/index.js index 34af314..0e6d0f5 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,18 +1,6 @@ -try { - module.exports = require("../../build/Release/tree_sitter_opengoal_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_opengoal_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} +const root = require("path").join(__dirname, "..", ".."); + +module.exports = require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); diff --git a/bindings/python/tree_sitter_opengoal/__init__.py b/bindings/python/tree_sitter_opengoal/__init__.py new file mode 100644 index 0000000..537e973 --- /dev/null +++ b/bindings/python/tree_sitter_opengoal/__init__.py @@ -0,0 +1,5 @@ +"Opengoal grammar for tree-sitter" + +from ._binding import language + +__all__ = ["language"] diff --git a/bindings/python/tree_sitter_opengoal/__init__.pyi b/bindings/python/tree_sitter_opengoal/__init__.pyi new file mode 100644 index 0000000..5416666 --- /dev/null +++ b/bindings/python/tree_sitter_opengoal/__init__.pyi @@ -0,0 +1 @@ +def language() -> int: ... diff --git a/bindings/python/tree_sitter_opengoal/binding.c b/bindings/python/tree_sitter_opengoal/binding.c new file mode 100644 index 0000000..71eb598 --- /dev/null +++ b/bindings/python/tree_sitter_opengoal/binding.c @@ -0,0 +1,27 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_opengoal(void); + +static PyObject* _binding_language(PyObject *self, PyObject *args) { + return PyLong_FromVoidPtr(tree_sitter_opengoal()); +} + +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 = -1, + .m_methods = methods +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModule_Create(&module); +} diff --git a/bindings/python/tree_sitter_opengoal/py.typed b/bindings/python/tree_sitter_opengoal/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/bindings/swift/TreeSitterOpengoal/opengoal.h b/bindings/swift/TreeSitterOpengoal/opengoal.h new file mode 100644 index 0000000..44bd25c --- /dev/null +++ b/bindings/swift/TreeSitterOpengoal/opengoal.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_OPENGOAL_H_ +#define TREE_SITTER_OPENGOAL_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_opengoal(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_OPENGOAL_H_ diff --git a/grammar.js b/grammar.js index c0d7a41..9218124 100644 --- a/grammar.js +++ b/grammar.js @@ -137,8 +137,7 @@ module.exports = grammar({ [], inline: $ => - [$._kwd_unqualified, - $._sym_unqualified], + [$._sym_unqualified], rules: { // THIS MUST BE FIRST -- even though this doesn't look like it matters @@ -206,7 +205,7 @@ module.exports = grammar({ seq(field('numberOfArgs', $._format_token), '*'), '?', "Newline", - seq(repeat(choice($._format_token, ',')), /[$mrRbBdDgGxXeEoOsStTfF]/), + seq(repeat(choice($._format_token, ',')), /[$mrRbBdDgGxXeEoOsStTfHhJjKkLlNnVwWyYzZ]/), ), format_specifier: $ => prec.left(seq( diff --git a/package.json b/package.json index 2cfc82d..97f9fae 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,14 @@ "version": "1.0.0", "description": "A tree sitter parser for the OpenGOAL language", "main": "bindings/node", + "types": "bindings/node", "scripts": { "gen": "yarn tree-sitter generate", "test": "yarn tree-sitter test", "parse-sample": "yarn gen && yarn tree-sitter parse test/samples/sample.gc", - "parse-test": "yarn gen && yarn tree-sitter parse test/samples/test.gc" + "parse-test": "yarn gen && yarn tree-sitter parse test/samples/test.gc", + "install": "node-gyp-build", + "prebuildify": "prebuildify --napi --strip" }, "repository": { "type": "git", @@ -20,9 +23,38 @@ }, "homepage": "https://github.com/open-goal/tree-sitter-opengoal#readme", "dependencies": { - "nan": "^2.18.0" + "node-addon-api": "^7.1.0", + "node-gyp-build": "^4.8.0" + }, + "peerDependencies": { + "tree-sitter": "^0.21.0" + }, + "peerDependenciesMeta": { + "tree_sitter": { + "optional": true + } }, "devDependencies": { - "tree-sitter-cli": "^0.20.8" - } + "prebuildify": "^6.0.0", + "tree-sitter-cli": "^0.22.1" + }, + "files": [ + "grammar.js", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**" + ], + "tree-sitter": [ + { + "scope": "source.opengoal", + "file-types": [ + "gc", + "gs", + "gd", + "gp" + ] + } + ] } diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b8ec3e2 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-opengoal" +description = "Opengoal grammar for tree-sitter" +version = "0.0.1" +keywords = ["incremental", "parsing", "tree-sitter", "opengoal"] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed" +] +requires-python = ">=3.8" +license.text = "MIT" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/tree-sitter/tree-sitter-opengoal" + +[project.optional-dependencies] +core = ["tree-sitter~=0.21"] + +[tool.cibuildwheel] +build = "cp38-*" +build-frontend = "build" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0d62e13 --- /dev/null +++ b/setup.py @@ -0,0 +1,57 @@ +from os.path import isdir, join +from platform import system + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from wheel.bdist_wheel import bdist_wheel + + +class Build(build): + def run(self): + if isdir("queries"): + dest = join(self.build_lib, "tree_sitter_opengoal", "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 = "cp38", "abi3" + return python, abi, platform + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_opengoal": ["*.pyi", "py.typed"], + "tree_sitter_opengoal.queries": ["*.scm"], + }, + ext_package="tree_sitter_opengoal", + ext_modules=[ + Extension( + name="_binding", + sources=[ + "bindings/python/tree_sitter_opengoal/binding.c", + "src/parser.c", + # NOTE: if your language uses an external scanner, add it here. + ], + extra_compile_args=( + ["-std=c11"] if system() != 'Windows' else [] + ), + define_macros=[ + ("Py_LIMITED_API", "0x03080000"), + ("PY_SSIZE_T_CLEAN", None) + ], + include_dirs=["src"], + py_limited_api=True, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel + }, + zip_safe=False +) diff --git a/src/grammar.json b/src/grammar.json index 9c200f7..28e2043 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -646,7 +646,7 @@ }, { "type": "PATTERN", - "value": "[$mrRbBdDgGxXeEoOsStTfF]" + "value": "[$mrRbBdDgGxXeEoOsStTfHhJjKkLlNnVwWyYzZ]" } ] } @@ -1041,9 +1041,7 @@ "precedences": [], "externals": [], "inline": [ - "ReferenceError", "_sym_unqualified" ], "supertypes": [] } - diff --git a/src/parser.c b/src/parser.c index 7afe53d..8543b2f 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,7 +1,6 @@ -#include +#include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif @@ -16,7 +15,7 @@ #define MAX_ALIAS_SEQUENCE_LENGTH 4 #define PRODUCTION_ID_COUNT 12 -enum { +enum ts_symbol_identifiers { sym__ws = 1, sym_comment = 2, sym_block_comment = 3, @@ -531,7 +530,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { }, }; -enum { +enum ts_field_identifiers { field_close = 1, field_marker = 2, field_name = 3, @@ -722,20 +721,50 @@ static inline bool sym_kwd_lit_character_set_2(int32_t c) { : (c <= 8287 || c == 12288)))))); } -static inline bool aux_sym_str_lit_token1_character_set_1(int32_t c) { - return (c < 'b' - ? (c < 'O' +static inline bool aux_sym_format_directive_type_token11_character_set_1(int32_t c) { + return (c < 'R' + ? (c < 'G' ? (c < 'B' ? c == '$' - : c <= 'G') - : (c <= 'O' || (c < 'X' - ? (c >= 'R' && c <= 'T') - : c <= 'X'))) - : (c <= 'g' || (c < 'r' - ? (c < 'o' - ? c == 'm' + : c <= 'E') + : (c <= 'L' || c == 'O')) + : (c <= 'T' || (c < 'r' + ? (c < 'b' + ? (c >= 'X' && c <= 'Z') : c <= 'o') - : (c <= 't' || c == 'x')))); + : (c <= 't' || (c >= 'x' && c <= 'z'))))); +} + +static inline bool aux_sym_format_directive_type_token11_character_set_2(int32_t c) { + return (c < 'R' + ? (c < 'G' + ? (c < 'B' + ? c == '$' + : c <= 'E') + : (c <= 'L' || c == 'O')) + : (c <= 'T' || (c < 'r' + ? (c < 'b' + ? (c >= 'V' && c <= 'Z') + : c <= 'o') + : (c <= 't' || (c >= 'x' && c <= 'z'))))); +} + +static inline bool aux_sym_format_directive_type_token11_character_set_3(int32_t c) { + return (c < 'R' + ? (c < 'G' + ? (c < 'B' + ? c == '$' + : (c <= 'B' || (c >= 'D' && c <= 'E'))) + : (c <= 'H' || (c < 'N' + ? (c >= 'J' && c <= 'L') + : c <= 'O'))) + : (c <= 'T' || (c < 'j' + ? (c < 'b' + ? (c >= 'V' && c <= 'Z') + : (c <= 'b' || (c >= 'd' && c <= 'h'))) + : (c <= 'o' || (c < 'w' + ? (c >= 'r' && c <= 't') + : c <= 'z'))))); } static inline bool aux_sym__sym_unqualified_token1_character_set_1(int32_t c) { @@ -795,184 +824,242 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(22); - if (lookahead == '\n') ADVANCE(66); - if (lookahead == '\r') ADVANCE(66); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '#') ADVANCE(66); - if (lookahead == '%') ADVANCE(66); - if (lookahead == '&') ADVANCE(66); - if (lookahead == '\'') ADVANCE(66); - if (lookahead == '(') ADVANCE(66); - if (lookahead == ')') ADVANCE(66); - if (lookahead == '*') ADVANCE(66); - if (lookahead == ',') ADVANCE(66); - if (lookahead == '/') ADVANCE(66); - if (lookahead == ':') ADVANCE(66); - if (lookahead == ';') ADVANCE(66); - if (lookahead == '?') ADVANCE(66); - if (lookahead == '@') ADVANCE(66); - if (lookahead == 'V') ADVANCE(66); - if (lookahead == '\\') ADVANCE(32); - if (lookahead == '^') ADVANCE(66); - if (lookahead == '_') ADVANCE(66); - if (lookahead == '`') ADVANCE(66); - if (lookahead == 'v') ADVANCE(66); - if (lookahead == '|') ADVANCE(66); - if (lookahead == '~') ADVANCE(42); + if (eof) ADVANCE(23); + if (lookahead == '\n') ADVANCE(68); + if (lookahead == '\r') ADVANCE(68); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '#') ADVANCE(68); + if (lookahead == '%') ADVANCE(68); + if (lookahead == '&') ADVANCE(68); + if (lookahead == '\'') ADVANCE(68); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(68); + if (lookahead == '*') ADVANCE(68); + if (lookahead == ',') ADVANCE(68); + if (lookahead == '/') ADVANCE(68); + if (lookahead == ':') ADVANCE(68); + if (lookahead == ';') ADVANCE(68); + if (lookahead == '?') ADVANCE(68); + if (lookahead == '@') ADVANCE(68); + if (lookahead == 'V') ADVANCE(68); + if (lookahead == '\\') ADVANCE(33); + if (lookahead == '^') ADVANCE(68); + if (lookahead == '_') ADVANCE(68); + if (lookahead == '`') ADVANCE(68); + if (lookahead == 'v') ADVANCE(68); + if (lookahead == '|') ADVANCE(68); + if (lookahead == '~') ADVANCE(43); if (lookahead == '<' || - lookahead == '>') ADVANCE(66); + lookahead == '>') ADVANCE(68); if (lookahead == 'A' || - lookahead == 'a') ADVANCE(66); + lookahead == 'a') ADVANCE(68); if (lookahead == 'C' || - lookahead == 'c') ADVANCE(66); + lookahead == 'c') ADVANCE(68); if (lookahead == 'I' || - lookahead == 'i') ADVANCE(66); + lookahead == 'i') ADVANCE(68); if (lookahead == 'P' || - lookahead == 'p') ADVANCE(66); + lookahead == 'p') ADVANCE(68); if (lookahead == 'W' || - lookahead == 'w') ADVANCE(66); - if (('[' <= lookahead && lookahead <= ']')) ADVANCE(66); - if (('{' <= lookahead && lookahead <= '}')) ADVANCE(66); - if (aux_sym_str_lit_token1_character_set_1(lookahead)) ADVANCE(66); - if (lookahead != 0) ADVANCE(66); + lookahead == 'w') ADVANCE(68); + if (('[' <= lookahead && lookahead <= ']')) ADVANCE(68); + if (('{' <= lookahead && lookahead <= '}')) ADVANCE(68); + if (lookahead == '$' || + ('B' <= lookahead && lookahead <= 'E') || + ('G' <= lookahead && lookahead <= 'L') || + lookahead == 'N' || + lookahead == 'O' || + ('R' <= lookahead && lookahead <= 'T') || + ('X' <= lookahead && lookahead <= 'o') || + ('r' <= lookahead && lookahead <= 't') || + ('x' <= lookahead && lookahead <= 'z')) ADVANCE(68); + if (lookahead != 0) ADVANCE(68); END_STATE(); case 1: - if (lookahead == '\n') ADVANCE(48); - if (lookahead == '\r') ADVANCE(49); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '#') ADVANCE(35); - if (lookahead == '%') ADVANCE(43); - if (lookahead == '&') ADVANCE(44); - if (lookahead == '\'') ADVANCE(31); - if (lookahead == '*') ADVANCE(61); - if (lookahead == ',') ADVANCE(36); - if (lookahead == ':') ADVANCE(40); - if (lookahead == ';') ADVANCE(59); - if (lookahead == '?') ADVANCE(62); - if (lookahead == '@') ADVANCE(38); - if (lookahead == 'N') ADVANCE(8); - if (lookahead == 'V') ADVANCE(34); - if (lookahead == '^') ADVANCE(47); - if (lookahead == '_') ADVANCE(54); - if (lookahead == '`') ADVANCE(60); - if (lookahead == 'v') ADVANCE(33); - if (lookahead == '|') ADVANCE(45); - if (lookahead == '~') ADVANCE(42); - if (('+' <= lookahead && lookahead <= '-')) ADVANCE(5); + if (lookahead == '\n') ADVANCE(49); + if (lookahead == '\r') ADVANCE(50); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '#') ADVANCE(36); + if (lookahead == '%') ADVANCE(44); + if (lookahead == '&') ADVANCE(45); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == ',') ADVANCE(37); + if (lookahead == ':') ADVANCE(41); + if (lookahead == ';') ADVANCE(60); + if (lookahead == '?') ADVANCE(63); + if (lookahead == '@') ADVANCE(39); + if (lookahead == 'N') ADVANCE(66); + if (lookahead == 'V') ADVANCE(35); + if (lookahead == '^') ADVANCE(48); + if (lookahead == '_') ADVANCE(55); + if (lookahead == '`') ADVANCE(61); + if (lookahead == 'v') ADVANCE(34); + if (lookahead == '|') ADVANCE(46); + if (lookahead == '~') ADVANCE(43); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(7); if (lookahead == '<' || - lookahead == '>') ADVANCE(58); + lookahead == '>') ADVANCE(59); if (lookahead == 'A' || - lookahead == 'a') ADVANCE(53); + lookahead == 'a') ADVANCE(54); if (lookahead == 'C' || - lookahead == 'c') ADVANCE(46); + lookahead == 'c') ADVANCE(47); if (lookahead == 'I' || - lookahead == 'i') ADVANCE(51); + lookahead == 'i') ADVANCE(52); if (lookahead == 'P' || - lookahead == 'p') ADVANCE(50); + lookahead == 'p') ADVANCE(51); if (lookahead == 'W' || - lookahead == 'w') ADVANCE(52); + lookahead == 'w') ADVANCE(53); if (lookahead == '[' || - lookahead == ']') ADVANCE(57); - if (('{' <= lookahead && lookahead <= '}')) ADVANCE(56); + lookahead == ']') ADVANCE(58); + if (('{' <= lookahead && lookahead <= '}')) ADVANCE(57); if (lookahead == '(' || - lookahead == ')') ADVANCE(55); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); - if (aux_sym_str_lit_token1_character_set_1(lookahead)) ADVANCE(64); + lookahead == ')') ADVANCE(56); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); + if (aux_sym_format_directive_type_token11_character_set_1(lookahead)) ADVANCE(65); END_STATE(); case 2: - if (lookahead == '"') ADVANCE(65); - if (lookahead == '\\') ADVANCE(18); - if (lookahead == '~') ADVANCE(42); - if (lookahead != 0) ADVANCE(66); + if (lookahead == '\n') ADVANCE(49); + if (lookahead == '\r') ADVANCE(50); + if (lookahead == '#') ADVANCE(9); + if (lookahead == '%') ADVANCE(44); + if (lookahead == '&') ADVANCE(45); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == ',') ADVANCE(37); + if (lookahead == ':') ADVANCE(41); + if (lookahead == ';') ADVANCE(60); + if (lookahead == '?') ADVANCE(63); + if (lookahead == '@') ADVANCE(39); + if (lookahead == 'N') ADVANCE(66); + if (lookahead == '^') ADVANCE(48); + if (lookahead == '_') ADVANCE(55); + if (lookahead == '`') ADVANCE(61); + if (lookahead == '|') ADVANCE(46); + if (lookahead == '~') ADVANCE(43); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(7); + if (lookahead == '<' || + lookahead == '>') ADVANCE(59); + if (lookahead == 'A' || + lookahead == 'a') ADVANCE(54); + if (lookahead == 'C' || + lookahead == 'c') ADVANCE(47); + if (lookahead == 'I' || + lookahead == 'i') ADVANCE(52); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(51); + if (lookahead == 'W' || + lookahead == 'w') ADVANCE(53); + if (lookahead == '[' || + lookahead == ']') ADVANCE(58); + if (('{' <= lookahead && lookahead <= '}')) ADVANCE(57); + if (lookahead == '(' || + lookahead == ')') ADVANCE(56); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); + if (aux_sym_format_directive_type_token11_character_set_2(lookahead)) ADVANCE(65); END_STATE(); case 3: - if (lookahead == '#') ADVANCE(20); - if (lookahead == '|') ADVANCE(4); - if (lookahead != 0) ADVANCE(3); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '\\') ADVANCE(19); + if (lookahead == '~') ADVANCE(43); + if (lookahead != 0) ADVANCE(68); END_STATE(); case 4: - if (lookahead == '#') ADVANCE(25); - if (lookahead != 0) ADVANCE(3); + if (lookahead == '#') ADVANCE(21); + if (lookahead == '|') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 5: - if (lookahead == '#') ADVANCE(7); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + if (lookahead == '#') ADVANCE(26); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 6: - if (lookahead == '\\') ADVANCE(19); - if (lookahead == 'b') ADVANCE(14); - if (lookahead == 'f' || - lookahead == 't') ADVANCE(71); - if (lookahead == 'x') ADVANCE(15); - if (lookahead == '|') ADVANCE(3); + if (lookahead == '#') ADVANCE(9); + if (lookahead == '%') ADVANCE(44); + if (lookahead == '&') ADVANCE(45); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == '*') ADVANCE(62); + if (lookahead == ',') ADVANCE(37); + if (lookahead == ':') ADVANCE(41); + if (lookahead == '@') ADVANCE(39); + if (lookahead == '|') ADVANCE(46); + if (lookahead == '~') ADVANCE(43); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(7); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); + if (aux_sym_format_directive_type_token11_character_set_3(lookahead)) ADVANCE(65); END_STATE(); case 7: - if (lookahead == 'b') ADVANCE(14); - if (lookahead == 'x') ADVANCE(15); + if (lookahead == '#') ADVANCE(9); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); END_STATE(); case 8: - if (lookahead == 'e') ADVANCE(13); + if (lookahead == '\\') ADVANCE(20); + if (lookahead == 'b') ADVANCE(15); + if (lookahead == 'f' || + lookahead == 't') ADVANCE(73); + if (lookahead == 'x') ADVANCE(16); + if (lookahead == '|') ADVANCE(4); END_STATE(); case 9: - if (lookahead == 'e') ADVANCE(63); + if (lookahead == 'b') ADVANCE(15); + if (lookahead == 'x') ADVANCE(16); END_STATE(); case 10: - if (lookahead == 'i') ADVANCE(12); + if (lookahead == 'e') ADVANCE(64); END_STATE(); case 11: - if (lookahead == 'l') ADVANCE(10); + if (lookahead == 'i') ADVANCE(13); END_STATE(); case 12: - if (lookahead == 'n') ADVANCE(9); + if (lookahead == 'l') ADVANCE(11); END_STATE(); case 13: - if (lookahead == 'w') ADVANCE(11); + if (lookahead == 'n') ADVANCE(10); END_STATE(); case 14: - if (lookahead == '0' || - lookahead == '1') ADVANCE(27); + if (lookahead == 'w') ADVANCE(12); END_STATE(); case 15: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(29); + if (lookahead == '0' || + lookahead == '1') ADVANCE(28); END_STATE(); case 16: - if (!sym_kwd_lit_character_set_1(lookahead)) ADVANCE(30); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(30); END_STATE(); case 17: - if (lookahead != 0 && - lookahead != '\n') ADVANCE(32); + if (!sym_kwd_lit_character_set_1(lookahead)) ADVANCE(31); END_STATE(); case 18: if (lookahead != 0 && - lookahead != '\n') ADVANCE(67); + lookahead != '\n') ADVANCE(33); END_STATE(); case 19: if (lookahead != 0 && - lookahead != '\\') ADVANCE(68); - if (lookahead == '\\') ADVANCE(69); + lookahead != '\n') ADVANCE(69); END_STATE(); case 20: if (lookahead != 0 && - lookahead != '|') ADVANCE(3); + lookahead != '\\') ADVANCE(70); + if (lookahead == '\\') ADVANCE(71); END_STATE(); case 21: - if (eof) ADVANCE(22); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '#') ADVANCE(6); - if (lookahead == '\'') ADVANCE(31); - if (lookahead == '(') ADVANCE(81); - if (lookahead == ')') ADVANCE(82); - if (lookahead == ',') ADVANCE(37); - if (lookahead == '/') ADVANCE(72); - if (lookahead == ':') ADVANCE(16); - if (lookahead == ';') ADVANCE(24); - if (lookahead == '`') ADVANCE(60); - if (lookahead == 'n') ADVANCE(77); - if (('+' <= lookahead && lookahead <= '-')) ADVANCE(73); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + if (lookahead != 0 && + lookahead != '|') ADVANCE(4); + END_STATE(); + case 22: + if (eof) ADVANCE(23); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '#') ADVANCE(8); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == '(') ADVANCE(83); + if (lookahead == ')') ADVANCE(84); + if (lookahead == ',') ADVANCE(38); + if (lookahead == '/') ADVANCE(74); + if (lookahead == ':') ADVANCE(17); + if (lookahead == ';') ADVANCE(25); + if (lookahead == '`') ADVANCE(61); + if (lookahead == 'n') ADVANCE(79); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(75); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); if (('\t' <= lookahead && lookahead <= '\r') || (28 <= lookahead && lookahead <= ' ') || lookahead == 5760 || @@ -981,18 +1068,18 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead == 8232 || lookahead == 8233 || lookahead == 8287 || - lookahead == 12288) ADVANCE(23); + lookahead == 12288) ADVANCE(24); if (lookahead != 0 && lookahead != '@' && (lookahead < '[' || '^' < lookahead) && lookahead != '{' && lookahead != '}' && - lookahead != '~') ADVANCE(80); + lookahead != '~') ADVANCE(82); END_STATE(); - case 22: + case 23: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); - case 23: + case 24: ACCEPT_TOKEN(sym__ws); if (('\t' <= lookahead && lookahead <= '\r') || (28 <= lookahead && lookahead <= ' ') || @@ -1002,230 +1089,234 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead == 8232 || lookahead == 8233 || lookahead == 8287 || - lookahead == 12288) ADVANCE(23); + lookahead == 12288) ADVANCE(24); END_STATE(); - case 24: + case 25: ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && - lookahead != '\n') ADVANCE(24); - END_STATE(); - case 25: - ACCEPT_TOKEN(sym_block_comment); + lookahead != '\n') ADVANCE(25); END_STATE(); case 26: - ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (lookahead == '.') ADVANCE(28); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + ACCEPT_TOKEN(sym_block_comment); END_STATE(); case 27: ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (lookahead == '0' || - lookahead == '1') ADVANCE(27); + if (lookahead == '.') ADVANCE(29); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); END_STATE(); case 28: ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(28); + if (lookahead == '0' || + lookahead == '1') ADVANCE(28); END_STATE(); case 29: ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(29); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(29); END_STATE(); case 30: - ACCEPT_TOKEN(sym_kwd_lit); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(30); + ACCEPT_TOKEN(aux_sym_num_lit_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(30); END_STATE(); case 31: - ACCEPT_TOKEN(anon_sym_SQUOTE); + ACCEPT_TOKEN(sym_kwd_lit); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(31); END_STATE(); case 32: - ACCEPT_TOKEN(aux_sym__format_token_token1); + ACCEPT_TOKEN(anon_sym_SQUOTE); END_STATE(); case 33: - ACCEPT_TOKEN(anon_sym_v); + ACCEPT_TOKEN(aux_sym__format_token_token1); END_STATE(); case 34: - ACCEPT_TOKEN(anon_sym_V); + ACCEPT_TOKEN(anon_sym_v); END_STATE(); case 35: - ACCEPT_TOKEN(anon_sym_POUND); - if (lookahead == 'b') ADVANCE(14); - if (lookahead == 'x') ADVANCE(15); + ACCEPT_TOKEN(anon_sym_V); END_STATE(); case 36: - ACCEPT_TOKEN(anon_sym_COMMA); + ACCEPT_TOKEN(anon_sym_POUND); + if (lookahead == 'b') ADVANCE(15); + if (lookahead == 'x') ADVANCE(16); END_STATE(); case 37: ACCEPT_TOKEN(anon_sym_COMMA); - if (lookahead == '@') ADVANCE(83); END_STATE(); case 38: - ACCEPT_TOKEN(anon_sym_AT); - if (lookahead == ':') ADVANCE(39); + ACCEPT_TOKEN(anon_sym_COMMA); + if (lookahead == '@') ADVANCE(85); END_STATE(); case 39: - ACCEPT_TOKEN(anon_sym_AT_COLON); + ACCEPT_TOKEN(anon_sym_AT); + if (lookahead == ':') ADVANCE(40); END_STATE(); case 40: - ACCEPT_TOKEN(anon_sym_COLON); - if (lookahead == '@') ADVANCE(41); + ACCEPT_TOKEN(anon_sym_AT_COLON); END_STATE(); case 41: - ACCEPT_TOKEN(anon_sym_COLON_AT); + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == '@') ADVANCE(42); END_STATE(); case 42: - ACCEPT_TOKEN(anon_sym_TILDE); + ACCEPT_TOKEN(anon_sym_COLON_AT); END_STATE(); case 43: - ACCEPT_TOKEN(anon_sym_PERCENT); + ACCEPT_TOKEN(anon_sym_TILDE); END_STATE(); case 44: - ACCEPT_TOKEN(anon_sym_AMP); + ACCEPT_TOKEN(anon_sym_PERCENT); END_STATE(); case 45: - ACCEPT_TOKEN(anon_sym_PIPE); + ACCEPT_TOKEN(anon_sym_AMP); END_STATE(); case 46: - ACCEPT_TOKEN(aux_sym_format_directive_type_token1); + ACCEPT_TOKEN(anon_sym_PIPE); END_STATE(); case 47: - ACCEPT_TOKEN(aux_sym_format_directive_type_token2); + ACCEPT_TOKEN(aux_sym_format_directive_type_token1); END_STATE(); case 48: - ACCEPT_TOKEN(anon_sym_LF); + ACCEPT_TOKEN(aux_sym_format_directive_type_token2); END_STATE(); case 49: - ACCEPT_TOKEN(anon_sym_CR); + ACCEPT_TOKEN(anon_sym_LF); END_STATE(); case 50: - ACCEPT_TOKEN(aux_sym_format_directive_type_token3); + ACCEPT_TOKEN(anon_sym_CR); END_STATE(); case 51: - ACCEPT_TOKEN(aux_sym_format_directive_type_token4); + ACCEPT_TOKEN(aux_sym_format_directive_type_token3); END_STATE(); case 52: - ACCEPT_TOKEN(aux_sym_format_directive_type_token5); + ACCEPT_TOKEN(aux_sym_format_directive_type_token4); END_STATE(); case 53: - ACCEPT_TOKEN(aux_sym_format_directive_type_token6); + ACCEPT_TOKEN(aux_sym_format_directive_type_token5); END_STATE(); case 54: - ACCEPT_TOKEN(anon_sym__); + ACCEPT_TOKEN(aux_sym_format_directive_type_token6); END_STATE(); case 55: - ACCEPT_TOKEN(aux_sym_format_directive_type_token7); + ACCEPT_TOKEN(anon_sym__); END_STATE(); case 56: - ACCEPT_TOKEN(aux_sym_format_directive_type_token8); + ACCEPT_TOKEN(aux_sym_format_directive_type_token7); END_STATE(); case 57: - ACCEPT_TOKEN(aux_sym_format_directive_type_token9); + ACCEPT_TOKEN(aux_sym_format_directive_type_token8); END_STATE(); case 58: - ACCEPT_TOKEN(aux_sym_format_directive_type_token10); + ACCEPT_TOKEN(aux_sym_format_directive_type_token9); END_STATE(); case 59: - ACCEPT_TOKEN(anon_sym_SEMI); + ACCEPT_TOKEN(aux_sym_format_directive_type_token10); END_STATE(); case 60: - ACCEPT_TOKEN(anon_sym_BQUOTE); + ACCEPT_TOKEN(anon_sym_SEMI); END_STATE(); case 61: - ACCEPT_TOKEN(anon_sym_STAR); + ACCEPT_TOKEN(anon_sym_BQUOTE); END_STATE(); case 62: - ACCEPT_TOKEN(anon_sym_QMARK); + ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); case 63: - ACCEPT_TOKEN(anon_sym_Newline); + ACCEPT_TOKEN(anon_sym_QMARK); END_STATE(); case 64: - ACCEPT_TOKEN(aux_sym_format_directive_type_token11); + ACCEPT_TOKEN(anon_sym_Newline); END_STATE(); case 65: - ACCEPT_TOKEN(anon_sym_DQUOTE); + ACCEPT_TOKEN(aux_sym_format_directive_type_token11); END_STATE(); case 66: + ACCEPT_TOKEN(aux_sym_format_directive_type_token11); + if (lookahead == 'e') ADVANCE(14); + END_STATE(); + case 67: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 68: ACCEPT_TOKEN(aux_sym_str_lit_token1); if (lookahead != 0 && lookahead != '"' && lookahead != '\\' && - lookahead != '~') ADVANCE(66); + lookahead != '~') ADVANCE(68); END_STATE(); - case 67: + case 69: ACCEPT_TOKEN(aux_sym_str_lit_token2); END_STATE(); - case 68: + case 70: ACCEPT_TOKEN(sym_char_lit); END_STATE(); - case 69: + case 71: ACCEPT_TOKEN(sym_char_lit); if (lookahead == 'n' || lookahead == 's' || - lookahead == 't') ADVANCE(68); - END_STATE(); - case 70: - ACCEPT_TOKEN(sym_null_lit); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); - END_STATE(); - case 71: - ACCEPT_TOKEN(sym_bool_lit); + lookahead == 't') ADVANCE(70); END_STATE(); case 72: - ACCEPT_TOKEN(anon_sym_SLASH); + ACCEPT_TOKEN(sym_null_lit); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 73: - ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == '#') ADVANCE(74); - if (!aux_sym__sym_unqualified_token1_character_set_1(lookahead)) ADVANCE(80); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + ACCEPT_TOKEN(sym_bool_lit); END_STATE(); case 74: - ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'b') ADVANCE(78); - if (lookahead == 'x') ADVANCE(79); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + ACCEPT_TOKEN(anon_sym_SLASH); END_STATE(); case 75: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'e') ADVANCE(70); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == '#') ADVANCE(76); + if (!aux_sym__sym_unqualified_token1_character_set_1(lookahead)) ADVANCE(82); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); END_STATE(); case 76: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'n') ADVANCE(75); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == 'b') ADVANCE(80); + if (lookahead == 'x') ADVANCE(81); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 77: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'o') ADVANCE(76); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == 'e') ADVANCE(72); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 78: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == '0' || - lookahead == '1') ADVANCE(27); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == 'n') ADVANCE(77); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 79: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (!aux_sym__sym_unqualified_token1_character_set_2(lookahead)) ADVANCE(80); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(29); + if (lookahead == 'o') ADVANCE(78); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 80: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == '0' || + lookahead == '1') ADVANCE(28); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 81: - ACCEPT_TOKEN(anon_sym_LPAREN); + ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); + if (!aux_sym__sym_unqualified_token1_character_set_2(lookahead)) ADVANCE(82); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(30); END_STATE(); case 82: - ACCEPT_TOKEN(anon_sym_RPAREN); + ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 83: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 85: ACCEPT_TOKEN(anon_sym_COMMA_AT); END_STATE(); default: @@ -1235,65 +1326,65 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 21}, + [1] = {.lex_state = 22}, [2] = {.lex_state = 1}, [3] = {.lex_state = 1}, [4] = {.lex_state = 1}, - [5] = {.lex_state = 1}, - [6] = {.lex_state = 21}, - [7] = {.lex_state = 21}, - [8] = {.lex_state = 1}, - [9] = {.lex_state = 21}, - [10] = {.lex_state = 21}, - [11] = {.lex_state = 21}, - [12] = {.lex_state = 21}, - [13] = {.lex_state = 1}, - [14] = {.lex_state = 21}, - [15] = {.lex_state = 21}, - [16] = {.lex_state = 21}, - [17] = {.lex_state = 21}, - [18] = {.lex_state = 1}, - [19] = {.lex_state = 21}, - [20] = {.lex_state = 21}, - [21] = {.lex_state = 21}, - [22] = {.lex_state = 1}, - [23] = {.lex_state = 1}, - [24] = {.lex_state = 21}, - [25] = {.lex_state = 21}, - [26] = {.lex_state = 21}, - [27] = {.lex_state = 21}, - [28] = {.lex_state = 21}, - [29] = {.lex_state = 21}, - [30] = {.lex_state = 21}, - [31] = {.lex_state = 21}, - [32] = {.lex_state = 21}, - [33] = {.lex_state = 21}, - [34] = {.lex_state = 21}, - [35] = {.lex_state = 21}, - [36] = {.lex_state = 21}, - [37] = {.lex_state = 21}, - [38] = {.lex_state = 21}, - [39] = {.lex_state = 21}, - [40] = {.lex_state = 21}, - [41] = {.lex_state = 21}, - [42] = {.lex_state = 1}, - [43] = {.lex_state = 1}, - [44] = {.lex_state = 1}, - [45] = {.lex_state = 1}, - [46] = {.lex_state = 1}, - [47] = {.lex_state = 2}, - [48] = {.lex_state = 2}, - [49] = {.lex_state = 2}, - [50] = {.lex_state = 1}, - [51] = {.lex_state = 2}, - [52] = {.lex_state = 2}, - [53] = {.lex_state = 2}, - [54] = {.lex_state = 2}, - [55] = {.lex_state = 2}, - [56] = {.lex_state = 2}, - [57] = {.lex_state = 2}, + [5] = {.lex_state = 2}, + [6] = {.lex_state = 22}, + [7] = {.lex_state = 22}, + [8] = {.lex_state = 2}, + [9] = {.lex_state = 22}, + [10] = {.lex_state = 22}, + [11] = {.lex_state = 22}, + [12] = {.lex_state = 22}, + [13] = {.lex_state = 2}, + [14] = {.lex_state = 22}, + [15] = {.lex_state = 22}, + [16] = {.lex_state = 22}, + [17] = {.lex_state = 22}, + [18] = {.lex_state = 2}, + [19] = {.lex_state = 22}, + [20] = {.lex_state = 22}, + [21] = {.lex_state = 22}, + [22] = {.lex_state = 2}, + [23] = {.lex_state = 2}, + [24] = {.lex_state = 22}, + [25] = {.lex_state = 22}, + [26] = {.lex_state = 22}, + [27] = {.lex_state = 22}, + [28] = {.lex_state = 22}, + [29] = {.lex_state = 22}, + [30] = {.lex_state = 22}, + [31] = {.lex_state = 22}, + [32] = {.lex_state = 22}, + [33] = {.lex_state = 22}, + [34] = {.lex_state = 22}, + [35] = {.lex_state = 22}, + [36] = {.lex_state = 22}, + [37] = {.lex_state = 22}, + [38] = {.lex_state = 22}, + [39] = {.lex_state = 22}, + [40] = {.lex_state = 22}, + [41] = {.lex_state = 22}, + [42] = {.lex_state = 6}, + [43] = {.lex_state = 6}, + [44] = {.lex_state = 6}, + [45] = {.lex_state = 6}, + [46] = {.lex_state = 6}, + [47] = {.lex_state = 3}, + [48] = {.lex_state = 3}, + [49] = {.lex_state = 3}, + [50] = {.lex_state = 6}, + [51] = {.lex_state = 3}, + [52] = {.lex_state = 3}, + [53] = {.lex_state = 3}, + [54] = {.lex_state = 3}, + [55] = {.lex_state = 3}, + [56] = {.lex_state = 3}, + [57] = {.lex_state = 3}, [58] = {.lex_state = 0}, - [59] = {.lex_state = 17}, + [59] = {.lex_state = 18}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1405,8 +1496,8 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_BQUOTE] = ACTIONS(41), [anon_sym_QMARK] = ACTIONS(41), [anon_sym_Newline] = ACTIONS(41), - [aux_sym_format_directive_type_token11] = ACTIONS(41), - [anon_sym_DQUOTE] = ACTIONS(43), + [aux_sym_format_directive_type_token11] = ACTIONS(43), + [anon_sym_DQUOTE] = ACTIONS(45), }, [3] = { [sym__format_token] = STATE(42), @@ -1445,8 +1536,8 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_BQUOTE] = ACTIONS(41), [anon_sym_QMARK] = ACTIONS(41), [anon_sym_Newline] = ACTIONS(41), - [aux_sym_format_directive_type_token11] = ACTIONS(41), - [anon_sym_DQUOTE] = ACTIONS(45), + [aux_sym_format_directive_type_token11] = ACTIONS(43), + [anon_sym_DQUOTE] = ACTIONS(47), }, [4] = { [sym__format_token] = STATE(42), @@ -1485,18 +1576,20 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_BQUOTE] = ACTIONS(41), [anon_sym_QMARK] = ACTIONS(41), [anon_sym_Newline] = ACTIONS(41), - [aux_sym_format_directive_type_token11] = ACTIONS(41), + [aux_sym_format_directive_type_token11] = ACTIONS(43), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 10, + [0] = 11, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, ACTIONS(35), 1, anon_sym_COMMA, + ACTIONS(43), 1, + aux_sym_format_directive_type_token11, STATE(18), 1, sym_format_modifiers, STATE(42), 1, @@ -1511,7 +1604,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(39), 2, anon_sym_AT_COLON, anon_sym_COLON_AT, - ACTIONS(41), 22, + ACTIONS(41), 21, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, @@ -1533,8 +1626,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [54] = 14, + [56] = 14, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1553,13 +1645,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(47), 1, + ACTIONS(49), 1, ts_builtin_sym_end, - ACTIONS(51), 1, + ACTIONS(53), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, - ACTIONS(49), 6, + ACTIONS(51), 6, sym__ws, sym_comment, sym_block_comment, @@ -1578,32 +1670,32 @@ static const uint16_t ts_small_parse_table[] = { sym_unquote_splicing_lit, sym_unquoting_lit, aux_sym_source_repeat1, - [112] = 14, - ACTIONS(53), 1, + [114] = 14, + ACTIONS(55), 1, ts_builtin_sym_end, - ACTIONS(58), 1, + ACTIONS(60), 1, aux_sym_num_lit_token1, - ACTIONS(61), 1, + ACTIONS(63), 1, anon_sym_SQUOTE, - ACTIONS(64), 1, + ACTIONS(66), 1, anon_sym_COMMA, - ACTIONS(67), 1, + ACTIONS(69), 1, anon_sym_BQUOTE, - ACTIONS(70), 1, + ACTIONS(72), 1, anon_sym_DQUOTE, - ACTIONS(73), 1, + ACTIONS(75), 1, sym_null_lit, - ACTIONS(76), 1, + ACTIONS(78), 1, anon_sym_SLASH, - ACTIONS(79), 1, + ACTIONS(81), 1, aux_sym__sym_unqualified_token1, - ACTIONS(82), 1, + ACTIONS(84), 1, anon_sym_LPAREN, - ACTIONS(85), 1, + ACTIONS(87), 1, anon_sym_COMMA_AT, STATE(33), 1, sym__bare_list_lit, - ACTIONS(55), 6, + ACTIONS(57), 6, sym__ws, sym_comment, sym_block_comment, @@ -1622,11 +1714,12 @@ static const uint16_t ts_small_parse_table[] = { sym_unquote_splicing_lit, sym_unquoting_lit, aux_sym_source_repeat1, - [170] = 2, - ACTIONS(90), 2, + [172] = 2, + ACTIONS(92), 3, anon_sym_AT, anon_sym_COLON, - ACTIONS(88), 27, + aux_sym_format_directive_type_token11, + ACTIONS(90), 26, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -1653,8 +1746,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [204] = 16, + [206] = 16, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1673,20 +1765,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(96), 1, - sym_null_lit, ACTIONS(98), 1, + sym_null_lit, + ACTIONS(100), 1, anon_sym_RPAREN, STATE(33), 1, sym__bare_list_lit, STATE(11), 2, sym__gap, aux_sym__bare_list_lit_repeat1, - ACTIONS(92), 3, + ACTIONS(94), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(94), 3, + ACTIONS(96), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1700,7 +1792,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [266] = 16, + [268] = 16, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1719,20 +1811,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(96), 1, + ACTIONS(98), 1, sym_null_lit, - ACTIONS(102), 1, + ACTIONS(104), 1, anon_sym_RPAREN, STATE(33), 1, sym__bare_list_lit, STATE(9), 2, sym__gap, aux_sym__bare_list_lit_repeat1, - ACTIONS(94), 3, + ACTIONS(96), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, - ACTIONS(100), 3, + ACTIONS(102), 3, sym__ws, sym_comment, sym_block_comment, @@ -1746,39 +1838,39 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [328] = 16, - ACTIONS(107), 1, + [330] = 16, + ACTIONS(109), 1, aux_sym_num_lit_token1, - ACTIONS(113), 1, + ACTIONS(115), 1, anon_sym_SQUOTE, - ACTIONS(116), 1, + ACTIONS(118), 1, anon_sym_COMMA, - ACTIONS(119), 1, + ACTIONS(121), 1, anon_sym_BQUOTE, - ACTIONS(122), 1, + ACTIONS(124), 1, anon_sym_DQUOTE, - ACTIONS(125), 1, + ACTIONS(127), 1, sym_null_lit, - ACTIONS(128), 1, + ACTIONS(130), 1, anon_sym_SLASH, - ACTIONS(131), 1, + ACTIONS(133), 1, aux_sym__sym_unqualified_token1, - ACTIONS(134), 1, + ACTIONS(136), 1, anon_sym_LPAREN, - ACTIONS(137), 1, - anon_sym_RPAREN, ACTIONS(139), 1, + anon_sym_RPAREN, + ACTIONS(141), 1, anon_sym_COMMA_AT, STATE(33), 1, sym__bare_list_lit, STATE(11), 2, sym__gap, aux_sym__bare_list_lit_repeat1, - ACTIONS(104), 3, + ACTIONS(106), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(110), 3, + ACTIONS(112), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1792,7 +1884,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [390] = 15, + [392] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1811,18 +1903,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(146), 1, + ACTIONS(148), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(144), 3, + ACTIONS(146), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1836,12 +1928,14 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [449] = 7, + [451] = 8, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(148), 1, + ACTIONS(43), 1, + aux_sym_format_directive_type_token11, + ACTIONS(150), 1, anon_sym_COMMA, STATE(42), 1, sym__format_token, @@ -1849,7 +1943,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym_format_modifiers_repeat1, STATE(52), 1, sym_format_directive_type, - ACTIONS(41), 22, + ACTIONS(41), 21, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, @@ -1871,8 +1965,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [492] = 15, + [496] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1891,18 +1984,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(152), 1, + ACTIONS(154), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(150), 3, + ACTIONS(152), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1916,7 +2009,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [551] = 15, + [555] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1935,18 +2028,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(158), 1, + ACTIONS(160), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(14), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(154), 3, + ACTIONS(156), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(156), 3, + ACTIONS(158), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1960,7 +2053,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [610] = 15, + [614] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1979,18 +2072,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(162), 1, + ACTIONS(164), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(160), 3, + ACTIONS(162), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2004,7 +2097,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [669] = 15, + [673] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2023,18 +2116,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(168), 1, + ACTIONS(170), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(21), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(164), 3, + ACTIONS(166), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(166), 3, + ACTIONS(168), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2048,12 +2141,14 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [728] = 7, + [732] = 8, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(148), 1, + ACTIONS(43), 1, + aux_sym_format_directive_type_token11, + ACTIONS(150), 1, anon_sym_COMMA, STATE(42), 1, sym__format_token, @@ -2061,7 +2156,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym_format_modifiers_repeat1, STATE(57), 1, sym_format_directive_type, - ACTIONS(41), 22, + ACTIONS(41), 21, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, @@ -2083,8 +2178,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [771] = 15, + [777] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2103,18 +2197,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(174), 1, + ACTIONS(176), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(12), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(170), 3, + ACTIONS(172), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(172), 3, + ACTIONS(174), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2128,7 +2222,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [830] = 15, + [836] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2147,18 +2241,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(180), 1, + ACTIONS(182), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(16), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(176), 3, + ACTIONS(178), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(178), 3, + ACTIONS(180), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2172,7 +2266,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [889] = 15, + [895] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2191,18 +2285,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(184), 1, + ACTIONS(186), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(182), 3, + ACTIONS(184), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2216,8 +2310,10 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [948] = 1, - ACTIONS(186), 25, + [954] = 2, + ACTIONS(190), 1, + aux_sym_format_directive_type_token11, + ACTIONS(188), 24, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2242,9 +2338,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, + [984] = 2, + ACTIONS(194), 1, aux_sym_format_directive_type_token11, - [976] = 1, - ACTIONS(188), 25, + ACTIONS(192), 24, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2269,13 +2366,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [1004] = 2, - ACTIONS(192), 3, + [1014] = 2, + ACTIONS(198), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(190), 15, + ACTIONS(196), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2291,12 +2387,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1027] = 2, - ACTIONS(196), 3, + [1037] = 2, + ACTIONS(202), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(194), 15, + ACTIONS(200), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2312,12 +2408,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1050] = 2, - ACTIONS(200), 3, + [1060] = 2, + ACTIONS(206), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(198), 15, + ACTIONS(204), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2333,12 +2429,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1073] = 2, - ACTIONS(204), 3, + [1083] = 2, + ACTIONS(210), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(202), 15, + ACTIONS(208), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2354,12 +2450,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1096] = 2, - ACTIONS(208), 3, + [1106] = 2, + ACTIONS(214), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(206), 15, + ACTIONS(212), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2375,19 +2471,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1119] = 4, + [1129] = 4, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(210), 3, + ACTIONS(216), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(215), 3, + ACTIONS(221), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(213), 10, + ACTIONS(219), 10, aux_sym_num_lit_token1, sym_kwd_lit, anon_sym_SQUOTE, @@ -2398,12 +2494,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH, anon_sym_LPAREN, anon_sym_COMMA_AT, - [1146] = 2, - ACTIONS(219), 3, + [1156] = 2, + ACTIONS(225), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(217), 15, + ACTIONS(223), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2419,12 +2515,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1169] = 2, - ACTIONS(223), 3, + [1179] = 2, + ACTIONS(229), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(221), 15, + ACTIONS(227), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2440,12 +2536,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1192] = 2, - ACTIONS(227), 3, + [1202] = 2, + ACTIONS(233), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(225), 15, + ACTIONS(231), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2461,12 +2557,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1215] = 2, - ACTIONS(231), 3, + [1225] = 2, + ACTIONS(237), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(229), 15, + ACTIONS(235), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2482,12 +2578,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1238] = 2, - ACTIONS(235), 3, + [1248] = 2, + ACTIONS(241), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(233), 15, + ACTIONS(239), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2503,12 +2599,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1261] = 2, - ACTIONS(239), 3, + [1271] = 2, + ACTIONS(245), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(237), 15, + ACTIONS(243), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2524,12 +2620,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1284] = 2, - ACTIONS(243), 3, + [1294] = 2, + ACTIONS(249), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(241), 15, + ACTIONS(247), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2545,12 +2641,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1307] = 2, - ACTIONS(247), 3, + [1317] = 2, + ACTIONS(253), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(245), 15, + ACTIONS(251), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2566,12 +2662,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1330] = 2, - ACTIONS(251), 3, + [1340] = 2, + ACTIONS(257), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(249), 15, + ACTIONS(255), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2587,12 +2683,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1353] = 2, - ACTIONS(255), 3, + [1363] = 2, + ACTIONS(261), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(253), 15, + ACTIONS(259), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2608,12 +2704,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1376] = 2, - ACTIONS(259), 3, + [1386] = 2, + ACTIONS(265), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(257), 15, + ACTIONS(263), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2629,12 +2725,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1399] = 2, - ACTIONS(263), 3, + [1409] = 2, + ACTIONS(269), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(261), 14, + ACTIONS(267), 14, sym__ws, sym_comment, sym_block_comment, @@ -2649,29 +2745,29 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1421] = 4, - ACTIONS(271), 1, + [1431] = 4, + ACTIONS(277), 1, anon_sym_STAR, - ACTIONS(267), 2, + ACTIONS(273), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(269), 4, + ACTIONS(275), 4, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, anon_sym_PIPE, - ACTIONS(265), 6, + ACTIONS(271), 6, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, anon_sym_AT_COLON, anon_sym_COLON_AT, aux_sym_format_directive_type_token11, - [1443] = 2, - ACTIONS(275), 2, + [1453] = 2, + ACTIONS(281), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(273), 11, + ACTIONS(279), 11, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2683,11 +2779,11 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE, anon_sym_STAR, aux_sym_format_directive_type_token11, - [1461] = 2, - ACTIONS(279), 2, + [1471] = 2, + ACTIONS(285), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(277), 11, + ACTIONS(283), 11, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2699,192 +2795,192 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE, anon_sym_STAR, aux_sym_format_directive_type_token11, - [1479] = 6, - ACTIONS(281), 1, + [1489] = 6, + ACTIONS(287), 1, aux_sym_num_lit_token1, - ACTIONS(284), 1, + ACTIONS(290), 1, anon_sym_SQUOTE, - ACTIONS(287), 1, + ACTIONS(293), 1, anon_sym_COMMA, - ACTIONS(290), 2, + ACTIONS(296), 2, anon_sym_AT, anon_sym_COLON, STATE(45), 2, sym__format_token, aux_sym_format_modifiers_repeat1, - ACTIONS(292), 3, + ACTIONS(298), 3, anon_sym_AT_COLON, anon_sym_COLON_AT, aux_sym_format_directive_type_token11, - [1502] = 7, + [1512] = 7, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(294), 1, - anon_sym_COMMA, ACTIONS(300), 1, + anon_sym_COMMA, + ACTIONS(306), 1, aux_sym_format_directive_type_token11, - ACTIONS(296), 2, + ACTIONS(302), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(298), 2, + ACTIONS(304), 2, anon_sym_AT_COLON, anon_sym_COLON_AT, STATE(45), 2, sym__format_token, aux_sym_format_modifiers_repeat1, - [1527] = 4, - ACTIONS(302), 1, + [1537] = 4, + ACTIONS(308), 1, anon_sym_TILDE, - ACTIONS(305), 1, + ACTIONS(311), 1, anon_sym_DQUOTE, - ACTIONS(307), 2, + ACTIONS(313), 2, aux_sym_str_lit_token1, aux_sym_str_lit_token2, STATE(47), 2, sym_format_specifier, aux_sym_str_lit_repeat1, - [1542] = 4, - ACTIONS(43), 1, + [1552] = 4, + ACTIONS(45), 1, anon_sym_DQUOTE, - ACTIONS(310), 1, + ACTIONS(316), 1, anon_sym_TILDE, - ACTIONS(312), 2, + ACTIONS(318), 2, aux_sym_str_lit_token1, aux_sym_str_lit_token2, STATE(47), 2, sym_format_specifier, aux_sym_str_lit_repeat1, - [1557] = 4, - ACTIONS(314), 1, + [1567] = 4, + ACTIONS(320), 1, anon_sym_TILDE, - ACTIONS(316), 1, + ACTIONS(322), 1, anon_sym_DQUOTE, - ACTIONS(318), 2, + ACTIONS(324), 2, aux_sym_str_lit_token1, aux_sym_str_lit_token2, STATE(48), 2, sym_format_specifier, aux_sym_str_lit_repeat1, - [1572] = 5, + [1582] = 5, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(294), 1, - anon_sym_COMMA, ACTIONS(300), 1, + anon_sym_COMMA, + ACTIONS(306), 1, aux_sym_format_directive_type_token11, STATE(45), 2, sym__format_token, aux_sym_format_modifiers_repeat1, - [1589] = 1, - ACTIONS(320), 4, + [1599] = 1, + ACTIONS(326), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1596] = 1, - ACTIONS(322), 4, + [1606] = 1, + ACTIONS(328), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1603] = 1, - ACTIONS(324), 4, + [1613] = 1, + ACTIONS(330), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1610] = 1, - ACTIONS(326), 4, + [1620] = 1, + ACTIONS(332), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1617] = 1, - ACTIONS(328), 4, + [1627] = 1, + ACTIONS(334), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1624] = 1, - ACTIONS(330), 4, + [1634] = 1, + ACTIONS(336), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1631] = 1, - ACTIONS(332), 4, + [1641] = 1, + ACTIONS(338), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1638] = 1, - ACTIONS(334), 1, + [1648] = 1, + ACTIONS(340), 1, ts_builtin_sym_end, - [1642] = 1, - ACTIONS(336), 1, + [1652] = 1, + ACTIONS(342), 1, aux_sym__format_token_token1, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(5)] = 0, - [SMALL_STATE(6)] = 54, - [SMALL_STATE(7)] = 112, - [SMALL_STATE(8)] = 170, - [SMALL_STATE(9)] = 204, - [SMALL_STATE(10)] = 266, - [SMALL_STATE(11)] = 328, - [SMALL_STATE(12)] = 390, - [SMALL_STATE(13)] = 449, - [SMALL_STATE(14)] = 492, - [SMALL_STATE(15)] = 551, - [SMALL_STATE(16)] = 610, - [SMALL_STATE(17)] = 669, - [SMALL_STATE(18)] = 728, - [SMALL_STATE(19)] = 771, - [SMALL_STATE(20)] = 830, - [SMALL_STATE(21)] = 889, - [SMALL_STATE(22)] = 948, - [SMALL_STATE(23)] = 976, - [SMALL_STATE(24)] = 1004, - [SMALL_STATE(25)] = 1027, - [SMALL_STATE(26)] = 1050, - [SMALL_STATE(27)] = 1073, - [SMALL_STATE(28)] = 1096, - [SMALL_STATE(29)] = 1119, - [SMALL_STATE(30)] = 1146, - [SMALL_STATE(31)] = 1169, - [SMALL_STATE(32)] = 1192, - [SMALL_STATE(33)] = 1215, - [SMALL_STATE(34)] = 1238, - [SMALL_STATE(35)] = 1261, - [SMALL_STATE(36)] = 1284, - [SMALL_STATE(37)] = 1307, - [SMALL_STATE(38)] = 1330, - [SMALL_STATE(39)] = 1353, - [SMALL_STATE(40)] = 1376, - [SMALL_STATE(41)] = 1399, - [SMALL_STATE(42)] = 1421, - [SMALL_STATE(43)] = 1443, - [SMALL_STATE(44)] = 1461, - [SMALL_STATE(45)] = 1479, - [SMALL_STATE(46)] = 1502, - [SMALL_STATE(47)] = 1527, - [SMALL_STATE(48)] = 1542, - [SMALL_STATE(49)] = 1557, - [SMALL_STATE(50)] = 1572, - [SMALL_STATE(51)] = 1589, - [SMALL_STATE(52)] = 1596, - [SMALL_STATE(53)] = 1603, - [SMALL_STATE(54)] = 1610, - [SMALL_STATE(55)] = 1617, - [SMALL_STATE(56)] = 1624, - [SMALL_STATE(57)] = 1631, - [SMALL_STATE(58)] = 1638, - [SMALL_STATE(59)] = 1642, + [SMALL_STATE(6)] = 56, + [SMALL_STATE(7)] = 114, + [SMALL_STATE(8)] = 172, + [SMALL_STATE(9)] = 206, + [SMALL_STATE(10)] = 268, + [SMALL_STATE(11)] = 330, + [SMALL_STATE(12)] = 392, + [SMALL_STATE(13)] = 451, + [SMALL_STATE(14)] = 496, + [SMALL_STATE(15)] = 555, + [SMALL_STATE(16)] = 614, + [SMALL_STATE(17)] = 673, + [SMALL_STATE(18)] = 732, + [SMALL_STATE(19)] = 777, + [SMALL_STATE(20)] = 836, + [SMALL_STATE(21)] = 895, + [SMALL_STATE(22)] = 954, + [SMALL_STATE(23)] = 984, + [SMALL_STATE(24)] = 1014, + [SMALL_STATE(25)] = 1037, + [SMALL_STATE(26)] = 1060, + [SMALL_STATE(27)] = 1083, + [SMALL_STATE(28)] = 1106, + [SMALL_STATE(29)] = 1129, + [SMALL_STATE(30)] = 1156, + [SMALL_STATE(31)] = 1179, + [SMALL_STATE(32)] = 1202, + [SMALL_STATE(33)] = 1225, + [SMALL_STATE(34)] = 1248, + [SMALL_STATE(35)] = 1271, + [SMALL_STATE(36)] = 1294, + [SMALL_STATE(37)] = 1317, + [SMALL_STATE(38)] = 1340, + [SMALL_STATE(39)] = 1363, + [SMALL_STATE(40)] = 1386, + [SMALL_STATE(41)] = 1409, + [SMALL_STATE(42)] = 1431, + [SMALL_STATE(43)] = 1453, + [SMALL_STATE(44)] = 1471, + [SMALL_STATE(45)] = 1489, + [SMALL_STATE(46)] = 1512, + [SMALL_STATE(47)] = 1537, + [SMALL_STATE(48)] = 1552, + [SMALL_STATE(49)] = 1567, + [SMALL_STATE(50)] = 1582, + [SMALL_STATE(51)] = 1599, + [SMALL_STATE(52)] = 1606, + [SMALL_STATE(53)] = 1613, + [SMALL_STATE(54)] = 1620, + [SMALL_STATE(55)] = 1627, + [SMALL_STATE(56)] = 1634, + [SMALL_STATE(57)] = 1641, + [SMALL_STATE(58)] = 1648, + [SMALL_STATE(59)] = 1652, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -2910,149 +3006,154 @@ static const TSParseActionEntry ts_parse_actions[] = { [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source, 1), - [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), - [53] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), - [55] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), - [58] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(30), - [61] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(15), - [64] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(20), - [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(19), - [70] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(49), - [73] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), - [76] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), - [79] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), - [82] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(10), - [85] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(17), - [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_prefix_parameters, 1), - [90] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_prefix_parameters, 1), - [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [104] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(11), - [107] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(30), - [110] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), - [113] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(15), - [116] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(20), - [119] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(19), - [122] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(49), - [125] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), - [128] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), - [131] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), - [134] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(10), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), - [139] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(17), - [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [146] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [152] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), - [154] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), - [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [174] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [186] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 1), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 2), - [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), - [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 3), - [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 3), - [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), - [200] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), - [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), - [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), - [206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), - [208] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), - [210] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), SHIFT_REPEAT(29), - [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), - [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_num_lit, 1), - [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_num_lit, 1), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), - [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), - [227] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), - [229] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_lit, 1, .production_id = 2), - [231] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_lit, 1, .production_id = 2), - [233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), - [235] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), - [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 2), - [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 2), - [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 4), - [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 4), - [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sym_lit, 1, .production_id = 1), - [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sym_lit, 1, .production_id = 1), - [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), - [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), - [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), - [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), - [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), - [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), - [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), - [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), - [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), - [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), - [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 1, .production_id = 7), - [275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 1, .production_id = 7), - [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 2), - [279] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 2), - [281] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(43), - [284] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(59), - [287] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(45), - [290] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), - [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), - [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [296] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), - [298] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [300] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [302] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(4), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), - [307] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(47), - [310] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [312] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 10), - [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 3), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 11), - [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 2), - [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 1), - [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 4), - [334] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [336] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [49] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source, 1), + [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), + [57] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), + [60] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(30), + [63] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(15), + [66] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(20), + [69] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(19), + [72] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(49), + [75] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), + [78] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), + [81] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), + [84] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(10), + [87] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(17), + [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_prefix_parameters, 1), + [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_prefix_parameters, 1), + [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [106] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(11), + [109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(30), + [112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), + [115] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(15), + [118] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(20), + [121] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(19), + [124] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(49), + [127] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), + [130] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), + [133] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), + [136] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(10), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), + [141] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(17), + [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [160] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [170] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), + [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 1), + [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_modifiers, 1), + [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 2), + [194] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_modifiers, 2), + [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), + [198] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 3), + [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 3), + [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), + [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), + [210] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), + [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), + [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), + [216] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), SHIFT_REPEAT(29), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_num_lit, 1), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_num_lit, 1), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_lit, 1, .production_id = 2), + [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_lit, 1, .production_id = 2), + [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), + [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 2), + [245] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 2), + [247] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 4), + [249] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 4), + [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sym_lit, 1, .production_id = 1), + [253] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sym_lit, 1, .production_id = 1), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), + [257] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), + [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), + [261] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), + [265] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), + [269] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), + [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 1, .production_id = 7), + [281] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 1, .production_id = 7), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 2), + [285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 2), + [287] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(43), + [290] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(59), + [293] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(45), + [296] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), + [298] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), + [300] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [302] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [304] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [306] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [308] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(4), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), + [313] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(47), + [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [320] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [322] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [324] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 10), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 3), + [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 11), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2), + [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 2), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 1), + [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 4), + [340] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), }; #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 -#define extern __declspec(dllexport) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) #endif -extern const TSLanguage *tree_sitter_opengoal(void) { +TS_PUBLIC const TSLanguage *tree_sitter_opengoal() { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1f4466d --- /dev/null +++ b/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); +extern void *(*ts_current_calloc)(size_t, size_t); +extern void *(*ts_current_realloc)(void *, size_t); +extern void (*ts_current_free)(void *); + +#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/src/tree_sitter/array.h b/src/tree_sitter/array.h new file mode 100644 index 0000000..186ba67 --- /dev/null +++ b/src/tree_sitter/array.h @@ -0,0 +1,287 @@ +#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(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) \ + (_array__grow((Array *)(self), count, array_elem_size(self)), \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)), \ + (self)->size += (count)) + +/// 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(default : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index 55d863b..9a2302a 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -13,9 +13,8 @@ extern "C" { #define ts_builtin_sym_end 0 #define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 -typedef uint16_t TSStateId; - #ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; @@ -130,9 +129,16 @@ struct TSLanguage { * 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; \ @@ -166,7 +172,7 @@ struct TSLanguage { * Parse Table Macros */ -#define SMALL_STATE(id) id - LARGE_STATE_COUNT +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) #define STATE(id) id @@ -176,7 +182,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value \ + .state = (state_value) \ } \ }} @@ -184,7 +190,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value, \ + .state = (state_value), \ .repetition = true \ } \ }} diff --git a/yarn.lock b/yarn.lock index a414b78..56f9377 100644 --- a/yarn.lock +++ b/yarn.lock @@ -111,6 +111,24 @@ __metadata: languageName: node linkType: hard +"base64-js@npm:^1.3.1": + version: 1.5.1 + resolution: "base64-js@npm:1.5.1" + checksum: f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf + languageName: node + linkType: hard + +"bl@npm:^4.0.3": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: "npm:^5.5.0" + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.4.0" + checksum: 02847e1d2cb089c9dc6958add42e3cdeaf07d13f575973963335ac0fdece563a50ac770ac4c8fa06492d2dd276f6cc3b7f08c7cd9c7a7ad0f8d388b2a28def5f + languageName: node + linkType: hard + "brace-expansion@npm:^2.0.1": version: 2.0.1 resolution: "brace-expansion@npm:2.0.1" @@ -120,6 +138,16 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" + dependencies: + base64-js: "npm:^1.3.1" + ieee754: "npm:^1.1.13" + checksum: 27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e + languageName: node + linkType: hard + "cacache@npm:^18.0.0": version: 18.0.1 resolution: "cacache@npm:18.0.1" @@ -140,6 +168,13 @@ __metadata: languageName: node linkType: hard +"chownr@npm:^1.1.1": + version: 1.1.4 + resolution: "chownr@npm:1.1.4" + checksum: ed57952a84cc0c802af900cf7136de643d3aba2eecb59d29344bc2f3f9bf703a301b9d84cdc71f82c3ffc9ccde831b0d92f5b45f91727d6c9da62f23aef9d9db + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -223,6 +258,15 @@ __metadata: languageName: node linkType: hard +"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: "npm:^1.4.0" + checksum: 870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 + languageName: node + linkType: hard + "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -237,6 +281,15 @@ __metadata: languageName: node linkType: hard +"execspawn@npm:^1.0.1": + version: 1.0.1 + resolution: "execspawn@npm:1.0.1" + dependencies: + util-extend: "npm:^1.0.1" + checksum: 5b168fe9f19cecdb9af46741d250503424a0ce5965d1181d1e74cbad6bf5bb4d51c9902212db2c226162b88e2bb6432f8a51c995ddd5004bd65b14f03a5bc4de + languageName: node + linkType: hard + "exponential-backoff@npm:^3.1.1": version: 3.1.1 resolution: "exponential-backoff@npm:3.1.1" @@ -254,6 +307,13 @@ __metadata: languageName: node linkType: hard +"fs-constants@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-constants@npm:1.0.0" + checksum: a0cde99085f0872f4d244e83e03a46aa387b74f5a5af750896c6b05e9077fac00e9932fdf5aef84f2f16634cd473c63037d7a512576da7d5c2b9163d1909f3a8 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -330,6 +390,13 @@ __metadata: languageName: node linkType: hard +"ieee754@npm:^1.1.13": + version: 1.2.1 + resolution: "ieee754@npm:1.2.1" + checksum: b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -344,6 +411,13 @@ __metadata: languageName: node linkType: hard +"inherits@npm:^2.0.3, inherits@npm:^2.0.4": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 + languageName: node + linkType: hard + "ip@npm:^2.0.0": version: 2.0.0 resolution: "ip@npm:2.0.0" @@ -436,6 +510,13 @@ __metadata: languageName: node linkType: hard +"minimist@npm:^1.2.5": + version: 1.2.8 + resolution: "minimist@npm:1.2.8" + checksum: 19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 + languageName: node + linkType: hard + "minipass-collect@npm:^2.0.1": version: 2.0.1 resolution: "minipass-collect@npm:2.0.1" @@ -520,6 +601,13 @@ __metadata: languageName: node linkType: hard +"mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3": + version: 0.5.3 + resolution: "mkdirp-classic@npm:0.5.3" + checksum: 95371d831d196960ddc3833cc6907e6b8f67ac5501a6582f47dfae5eb0f092e9f8ce88e0d83afcae95d6e2b61a01741ba03714eeafb6f7a6e9dcc158ac85b168 + languageName: node + linkType: hard + "mkdirp@npm:^1.0.3": version: 1.0.4 resolution: "mkdirp@npm:1.0.4" @@ -536,19 +624,39 @@ __metadata: languageName: node linkType: hard -"nan@npm:^2.18.0": - version: 2.18.0 - resolution: "nan@npm:2.18.0" +"negotiator@npm:^0.6.3": + version: 0.6.3 + resolution: "negotiator@npm:0.6.3" + checksum: 3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 + languageName: node + linkType: hard + +"node-abi@npm:^3.3.0": + version: 3.56.0 + resolution: "node-abi@npm:3.56.0" + dependencies: + semver: "npm:^7.3.5" + checksum: 1cdaee96ba3898905a9ad775dd88556478fcd73bbe815e575725209da37057d187fb96e7efb785e331f4b3725e9939014a69d2edd7bf6969fad73344e1fcaf2f + languageName: node + linkType: hard + +"node-addon-api@npm:^7.1.0": + version: 7.1.0 + resolution: "node-addon-api@npm:7.1.0" dependencies: node-gyp: "npm:latest" - checksum: 9209d80134fdb98c0afe35c1372d2b930a0a8d3c52706cb5e4257a27e9845c375f7a8daedadadec8d6403ca2eebb3b37d362ff5d1ec03249462abf65fef2a148 + checksum: 2e096ab079e3c46d33b0e252386e9c239c352f7cc6d75363d9a3c00bdff34c1a5da170da861917512843f213c32d024ced9dc9552b968029786480d18727ec66 languageName: node linkType: hard -"negotiator@npm:^0.6.3": - version: 0.6.3 - resolution: "negotiator@npm:0.6.3" - checksum: 3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 +"node-gyp-build@npm:^4.8.0": + version: 4.8.0 + resolution: "node-gyp-build@npm:4.8.0" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 85324be16f81f0235cbbc42e3eceaeb1b5ab94c8d8f5236755e1435b4908338c65a4e75f66ee343cbcb44ddf9b52a428755bec16dcd983295be4458d95c8e1ad languageName: node linkType: hard @@ -583,6 +691,24 @@ __metadata: languageName: node linkType: hard +"npm-run-path@npm:^3.1.0": + version: 3.1.0 + resolution: "npm-run-path@npm:3.1.0" + dependencies: + path-key: "npm:^3.0.0" + checksum: 8399f01239e9a5bf5a10bddbc71ecac97e0b7890e5b78abe9731fc759db48865b0686cc86ec079cd254a98ba119a3fa08f1b23f9de1a5428c19007bbc7b5a728 + languageName: node + linkType: hard + +"once@npm:^1.3.1, once@npm:^1.4.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: "npm:1" + checksum: 5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 + languageName: node + linkType: hard + "p-map@npm:^4.0.0": version: 4.0.0 resolution: "p-map@npm:4.0.0" @@ -592,7 +718,7 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^3.1.0": +"path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" checksum: 748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c @@ -609,6 +735,23 @@ __metadata: languageName: node linkType: hard +"prebuildify@npm:^6.0.0": + version: 6.0.0 + resolution: "prebuildify@npm:6.0.0" + dependencies: + execspawn: "npm:^1.0.1" + minimist: "npm:^1.2.5" + mkdirp-classic: "npm:^0.5.3" + node-abi: "npm:^3.3.0" + npm-run-path: "npm:^3.1.0" + pump: "npm:^3.0.0" + tar-fs: "npm:^2.1.0" + bin: + prebuildify: bin.js + checksum: 4dfaefd1465afc2211caa11423c5e10e72c527b22c48cd3e4b5833537cc1d26105e62888bd6f37e632e22fc26df3c9e6dfb097cfbf08d61edd8113d6369130a8 + languageName: node + linkType: hard + "proc-log@npm:^3.0.0": version: 3.0.0 resolution: "proc-log@npm:3.0.0" @@ -626,6 +769,27 @@ __metadata: languageName: node linkType: hard +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" + dependencies: + end-of-stream: "npm:^1.1.0" + once: "npm:^1.3.1" + checksum: bbdeda4f747cdf47db97428f3a135728669e56a0ae5f354a9ac5b74556556f5446a46f720a8f14ca2ece5be9b4d5d23c346db02b555f46739934cc6c093a5478 + languageName: node + linkType: hard + +"readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0": + version: 3.6.2 + resolution: "readable-stream@npm:3.6.2" + dependencies: + inherits: "npm:^2.0.3" + string_decoder: "npm:^1.1.1" + util-deprecate: "npm:^1.0.1" + checksum: e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -633,6 +797,13 @@ __metadata: languageName: node linkType: hard +"safe-buffer@npm:~5.2.0": + version: 5.2.1 + resolution: "safe-buffer@npm:5.2.1" + checksum: 6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 + languageName: node + linkType: hard + "safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -733,6 +904,15 @@ __metadata: languageName: node linkType: hard +"string_decoder@npm:^1.1.1": + version: 1.3.0 + resolution: "string_decoder@npm:1.3.0" + dependencies: + safe-buffer: "npm:~5.2.0" + checksum: 810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d + languageName: node + linkType: hard + "strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": version: 6.0.1 resolution: "strip-ansi@npm:6.0.1" @@ -751,6 +931,31 @@ __metadata: languageName: node linkType: hard +"tar-fs@npm:^2.1.0": + version: 2.1.1 + resolution: "tar-fs@npm:2.1.1" + dependencies: + chownr: "npm:^1.1.1" + mkdirp-classic: "npm:^0.5.2" + pump: "npm:^3.0.0" + tar-stream: "npm:^2.1.4" + checksum: 871d26a934bfb7beeae4c4d8a09689f530b565f79bd0cf489823ff0efa3705da01278160da10bb006d1a793fa0425cf316cec029b32a9159eacbeaff4965fb6d + languageName: node + linkType: hard + +"tar-stream@npm:^2.1.4": + version: 2.2.0 + resolution: "tar-stream@npm:2.2.0" + dependencies: + bl: "npm:^4.0.3" + end-of-stream: "npm:^1.4.1" + fs-constants: "npm:^1.0.0" + inherits: "npm:^2.0.3" + readable-stream: "npm:^3.1.1" + checksum: 2f4c910b3ee7196502e1ff015a7ba321ec6ea837667220d7bcb8d0852d51cb04b87f7ae471008a6fb8f5b1a1b5078f62f3a82d30c706f20ada1238ac797e7692 + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.2.0 resolution: "tar@npm:6.2.0" @@ -765,12 +970,12 @@ __metadata: languageName: node linkType: hard -"tree-sitter-cli@npm:^0.20.8": - version: 0.20.8 - resolution: "tree-sitter-cli@npm:0.20.8" +"tree-sitter-cli@npm:^0.22.1": + version: 0.22.1 + resolution: "tree-sitter-cli@npm:0.22.1" bin: tree-sitter: cli.js - checksum: 5f4b2c4e7a293c198480f42c280293569e70440c01ee24af71942cfd5865d21e223c22bb623f2f1130e9701d86367a1ff3c265e8e75bf8d8cc5cff8b0241200d + checksum: 8960a62b80f33d242301d33b9a4b01b038bae4136a796a005dbd2bd5178a8d7ec0bc576a6e5c4012b613f79ae1c30d8196ee0deda8ecf58e63bbf2f88995c6a3 languageName: node linkType: hard @@ -778,8 +983,15 @@ __metadata: version: 0.0.0-use.local resolution: "tree-sitter-opengoal@workspace:." dependencies: - nan: "npm:^2.18.0" - tree-sitter-cli: "npm:^0.20.8" + node-addon-api: "npm:^7.1.0" + node-gyp-build: "npm:^4.8.0" + prebuildify: "npm:^6.0.0" + tree-sitter-cli: "npm:^0.22.1" + peerDependencies: + tree-sitter: ^0.21.0 + peerDependenciesMeta: + tree_sitter: + optional: true languageName: unknown linkType: soft @@ -801,6 +1013,20 @@ __metadata: languageName: node linkType: hard +"util-deprecate@npm:^1.0.1": + version: 1.0.2 + resolution: "util-deprecate@npm:1.0.2" + checksum: 41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 + languageName: node + linkType: hard + +"util-extend@npm:^1.0.1": + version: 1.0.3 + resolution: "util-extend@npm:1.0.3" + checksum: 93d5a4faec6ce92d6976fc421ed716888054291602fed8067134867a37226738a557e4785f47b8a5ecde60837e0c694da73895f66badbd4bc8d57ec9d4799bfd + languageName: node + linkType: hard + "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -845,6 +1071,13 @@ __metadata: languageName: node linkType: hard +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 + languageName: node + linkType: hard + "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0"