diff --git a/.gitignore b/.gitignore index 007e56b3..a339e93a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,10 @@ dist/ test-workspace/ .vscode-test/ *.wasm -!tree-sitter-tolk/tree-sitter-tolk.wasm -!tree-sitter-fift/tree-sitter-fift.wasm -!tree-sitter-tlb/tree-sitter-tlb.wasm +!**/tree-sitter-tolk/tree-sitter-tolk.wasm +!**/tree-sitter-func/tree-sitter-func.wasm +!**/tree-sitter-fift/tree-sitter-fift.wasm +!**/tree-sitter-tlb/tree-sitter-tlb.wasm # tests server/src/e2e/out diff --git a/.vscodeignore b/.vscodeignore index e3a294f4..429e7cac 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -5,6 +5,7 @@ !dist/**/*.wasm !dist/**/*.svg !dist/**/*.tolk +!dist/**/*.fc # Include only this files !LICENSE diff --git a/README-extension.md b/README-extension.md index c4c47e25..610859af 100644 --- a/README-extension.md +++ b/README-extension.md @@ -33,7 +33,15 @@ Tolk support includes: FunC support includes: -- Basic syntax highlighting +- Semantic syntax highlighting +- Code completion, imports completion +- Go to definition +- Find all references, workspace symbol search, symbol renaming +- Automatic import updates when renaming and moving files +- Types and documentation on hover +- Inlay hints for method id +- On-the-fly inspections +- Build and test projects based on Blueprint Fift assembly support includes: diff --git a/README.md b/README.md index 43223a0d..1cb06aeb 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,15 @@ Tolk support includes: FunC support includes: -- Basic syntax highlighting +- Semantic syntax highlighting +- Code completion, imports completion +- Go to definition +- Find all references, workspace symbol search, symbol renaming +- Automatic import updates when renaming and moving files +- Types and documentation on hover +- Inlay hints for method id +- On-the-fly inspections +- Build and test projects based on Blueprint Fift assembly support includes: diff --git a/client/src/extension.ts b/client/src/extension.ts index 4bc027e2..76d32a47 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -80,13 +80,14 @@ async function startServer(context: vscode.ExtensionContext): Promise|\\^~]*" + "wordPattern": "`[^`]+`|[A-Za-z_$:][^\\s+\\-*\\/%,.;(){}\\[\\]=<>|\\^~]*", + "onEnterRules": [ + { + "beforeText": "^\\s*;;;.*$", + "action": { + "indent": "none", + "appendText": ";;; " + } + } + ] } diff --git a/eslint.config.mjs b/eslint.config.mjs index 1e097d5e..cdb0f601 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -30,6 +30,7 @@ export default tseslint.config( "server/src/languages/tolk/tree-sitter-tolk/", "server/src/languages/fift/tree-sitter-fift/", "server/src/languages/tolk/tree-sitter-tolk/", + "server/src/languages/func/tree-sitter-func/", "server/src/languages/tlb/tree-sitter-tlb/", ], }, diff --git a/package.json b/package.json index c1e23650..2a5782c9 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "fmt:check": "prettier --check --cache .", "grammar:wasm": "yarn grammar:tolk:wasm && yarn grammar:fift:wasm && yarn grammar:tlb:wasm", "grammar:tolk:wasm": "cd server/src/languages/tolk/tree-sitter-tolk && tree-sitter generate && tree-sitter build --wasm", + "grammar:func:wasm": "cd server/src/languages/func/tree-sitter-func && tree-sitter generate && tree-sitter build --wasm", "grammar:fift:wasm": "cd server/src/languages/fift/tree-sitter-fift && tree-sitter generate && tree-sitter build --wasm", "grammar:tlb:wasm": "cd server/src/languages/tlb/tree-sitter-tlb && tree-sitter generate && tree-sitter build --wasm", "watch": "webpack --watch", @@ -363,7 +364,17 @@ "ton.tolk.hints.showMethodId": { "type": "boolean", "default": true, - "description": "Show method ID hints for contract functions" + "description": "Show method ID hints for get methods" + }, + "ton.func.hints.disable": { + "type": "boolean", + "default": false, + "description": "Disable all inlay hints for FunC" + }, + "ton.func.hints.showMethodId": { + "type": "boolean", + "default": true, + "description": "Show method ID hints for functions with method_id" } } }, @@ -404,6 +415,20 @@ "type-compatibility" ], "description": "List of disabled code inspections. All inspections are enabled by default." + }, + "ton.func.inspections.disabled": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "unused-parameter", + "unused-type-parameter", + "unused-variable", + "unused-import" + ] + }, + "default": [], + "description": "List of disabled code inspections for FunC. All inspections are enabled by default." } } }, diff --git a/server/src/files.ts b/server/src/files.ts index cf1050c5..08904b2c 100644 --- a/server/src/files.ts +++ b/server/src/files.ts @@ -1,15 +1,17 @@ import * as lsp from "vscode-languageserver" import {TextDocument} from "vscode-languageserver-textdocument" import {pathToFileURL} from "node:url" -import {createFiftParser, createTlbParser, createTolkParser} from "@server/parser" +import {createFiftParser, createFuncParser, createTlbParser, createTolkParser} from "@server/parser" import {readFileVFS, globalVFS} from "@server/vfs/files-adapter" import {FiftFile} from "@server/languages/fift/psi/FiftFile" import {TlbFile} from "@server/languages/tlb/psi/TlbFile" import {URI} from "vscode-uri" import {TolkFile} from "@server/languages/tolk/psi/TolkFile" import {measureTime} from "@server/psi/utils" +import {FuncFile} from "@server/languages/func/psi/FuncFile" export const TOLK_PARSED_FILES_CACHE: Map = new Map() +export const FUNC_PARSED_FILES_CACHE: Map = new Map() export const FIFT_PARSED_FILES_CACHE: Map = new Map() export const TLB_PARSED_FILES_CACHE: Map = new Map() @@ -41,6 +43,34 @@ export function reparseTolkFile(uri: string, content: string): TolkFile { return file } +export async function findFuncFile(uri: string, changed: boolean = false): Promise { + const cached = FUNC_PARSED_FILES_CACHE.get(uri) + if (cached !== undefined && !changed) { + return cached + } + + const rawContent = await readOrUndefined(uri) + if (rawContent === undefined) { + console.error(`cannot read ${uri} file`) + } + + const content = rawContent ?? "" + return measureTime(`reparse ${uri}`, () => reparseFuncFile(uri, content)) +} + +export function reparseFuncFile(uri: string, content: string): FuncFile { + const parser = createFuncParser() + const tree = parser.parse(content) + if (!tree) { + throw new Error(`FATAL ERROR: cannot parse ${uri} file`) + } + + // TODO: why we have %40 here? + const file = new FuncFile(uri.replace("%40", "@"), tree, content) + FUNC_PARSED_FILES_CACHE.set(uri, file) + return file +} + export async function findFiftFile(uri: string): Promise { const cached = FIFT_PARSED_FILES_CACHE.get(uri) if (cached !== undefined) { @@ -108,6 +138,11 @@ export const isTolkFile = ( event?: lsp.TextDocumentChangeEvent, ): boolean => event?.document.languageId === "tolk" || uri.endsWith(".tolk") +export const isFuncFile = ( + uri: string, + event?: lsp.TextDocumentChangeEvent, +): boolean => event?.document.languageId === "func" || uri.endsWith(".fc") || uri.endsWith(".func") + export const isFiftFile = ( uri: string, event?: lsp.TextDocumentChangeEvent, diff --git a/server/src/func-indexing-root.ts b/server/src/func-indexing-root.ts new file mode 100644 index 00000000..4d37bbf9 --- /dev/null +++ b/server/src/func-indexing-root.ts @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import * as path from "node:path" +import {glob} from "glob" +import {index} from "@server/languages/func/indexes" +import {fileURLToPath} from "node:url" +import {filePathToUri, findFuncFile} from "@server/files" + +export enum FuncIndexingRootKind { + Stdlib = "stdlib", + Workspace = "workspace", +} + +export class FuncIndexingRoot { + public constructor( + public root: string, + public kind: FuncIndexingRootKind, + ) {} + + public async index(): Promise { + const ignore = + this.kind === FuncIndexingRootKind.Stdlib + ? [] + : [ + ".git/**", + "allure-results/**", + "**/node_modules/**", + "**/dist/**", + "**/__testdata/**", + ] + + const rootDir = fileURLToPath(this.root) + const files = await glob("**/*.{fc,func}", { + cwd: rootDir, + ignore: ignore, + }) + if (files.length === 0) { + console.warn(`No file to index in ${this.root}`) + } + for (const filePath of files) { + console.info("Indexing:", filePath) + const absPath = path.join(rootDir, filePath) + const uri = filePathToUri(absPath) + const file = await findFuncFile(uri) + index.addFile(uri, file, false) + } + } +} diff --git a/server/src/languages/func/cache.ts b/server/src/languages/func/cache.ts new file mode 100644 index 00000000..8f7fe7fa --- /dev/null +++ b/server/src/languages/func/cache.ts @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type {NamedNode} from "@server/languages/func/psi/FuncNode" + +export class Cache { + private readonly data: Map + + public constructor() { + this.data = new Map() + } + + public cached(key: TKey, cb: () => TValue): TValue { + const cached = this.data.get(key) + if (cached !== undefined) { + return cached + } + + const value = cb() + this.data.set(key, value) + return value + } + + public clear(): void { + this.data.clear() + } + + public get size(): number { + return this.data.size + } +} + +export class CacheManager { + public readonly resolveCache: Cache + + public constructor() { + this.resolveCache = new Cache() + } + + public clear(): void { + console.info(`Clearing caches (resolve: ${this.resolveCache.size})`) + this.resolveCache.clear() + } +} + +export const FUNC_CACHE = new CacheManager() diff --git a/server/src/languages/func/completion/CompletionContext.ts b/server/src/languages/func/completion/CompletionContext.ts new file mode 100644 index 00000000..3976cb10 --- /dev/null +++ b/server/src/languages/func/completion/CompletionContext.ts @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type * as lsp from "vscode-languageserver/node" +import {FuncNode} from "@server/languages/func/psi/FuncNode" + +export class CompletionContext { + public element: FuncNode + public position: lsp.Position + public triggerKind: lsp.CompletionTriggerKind + + public isType: boolean = false + public isExpression: boolean = false + public isStatement: boolean = false + public topLevel: boolean = false + public afterDot: boolean = false + public afterTilda: boolean = false + public beforeParen: boolean = false + public beforeSemicolon: boolean = false + public insideImport: boolean = false + + public constructor( + content: string, + element: FuncNode, + position: lsp.Position, + triggerKind: lsp.CompletionTriggerKind, + ) { + this.element = element + this.position = position + this.triggerKind = triggerKind + + const lines = content.split(/\n/g) + const currentLine = lines[position.line] + if (currentLine && currentLine[position.character - 1]) { + const symbolAfter = currentLine[position.character - 1] + this.afterDot = symbolAfter === "." + this.afterTilda = symbolAfter === "~" + const symbolAfterDummy = currentLine[position.character + "DummyIdentifier".length] + this.beforeParen = symbolAfterDummy === "(" + } + + const symbolAfter = element.file.symbolAt(element.node.endIndex) + this.beforeSemicolon = symbolAfter === ";" + + const parent = element.node.parent + if (!parent) return + + if ( + parent.type === "ERROR" && + (parent.parent?.type === "source_file" || + parent.parent?.parent?.parent?.type === "source_file") + ) { + this.topLevel = true + } + + if ( + parent.type === "type_identifier" && + parent.parent?.type === "ERROR" && + parent.parent.parent?.type === "source_file" + ) { + this.topLevel = true + } + + if (!this.topLevel) { + if (parent.type === "expression_statement") { + this.isStatement = true + } else { + this.isExpression = true + } + } + + if (element.node.type === "type_identifier") { + this.isType = true + } + + if (parent.type === "import_directive") { + this.insideImport = true + } + } + + public expression(): boolean { + return ( + (this.isExpression || this.isStatement) && + !this.afterDot && + !this.isType && + !this.insideImport + ) + } +} diff --git a/server/src/languages/func/completion/CompletionProvider.ts b/server/src/languages/func/completion/CompletionProvider.ts new file mode 100644 index 00000000..300bc9cd --- /dev/null +++ b/server/src/languages/func/completion/CompletionProvider.ts @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import {CompletionContext} from "./CompletionContext" +import {CompletionResult} from "@server/languages/func/completion/WeightedCompletionItem" + +export interface CompletionProvider { + isAvailable(ctx: CompletionContext): boolean + addCompletion(ctx: CompletionContext, result: CompletionResult): void +} + +export interface AsyncCompletionProvider { + isAvailable(ctx: CompletionContext): boolean + addCompletion(ctx: CompletionContext, result: CompletionResult): Promise +} diff --git a/server/src/languages/func/completion/ReferenceCompletionProcessor.ts b/server/src/languages/func/completion/ReferenceCompletionProcessor.ts new file mode 100644 index 00000000..cd7fe9c5 --- /dev/null +++ b/server/src/languages/func/completion/ReferenceCompletionProcessor.ts @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type {Node as SyntaxNode} from "web-tree-sitter" +import {CompletionItem, InsertTextFormat, CompletionItemKind} from "vscode-languageserver-types" +import {ScopeProcessor} from "@server/languages/func/psi/Reference" +import {NamedNode, FuncNode} from "@server/languages/func/psi/FuncNode" +import { + Constant, + Func, + GlobalVariable, + Parameter, + TypeParameter, +} from "@server/languages/func/psi/Decls" +import {CompletionContext} from "./CompletionContext" +import { + CompletionWeight, + WeightedCompletionItem, +} from "@server/languages/func/completion/WeightedCompletionItem" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {ResolveState} from "@server/psi/ResolveState" + +export interface CompletionItemAdditionalInformation { + readonly name: string | undefined + readonly file: FuncFile | undefined + readonly elementFile: FuncFile | undefined + readonly language: "tolk" | "func" | undefined +} + +export class ReferenceCompletionProcessor implements ScopeProcessor { + public constructor(private readonly ctx: CompletionContext) {} + + public result: Map = new Map() + + private allowedInContext(node: FuncNode): boolean { + if (this.ctx.isType) { + return node instanceof TypeParameter + } + + if (this.ctx.afterDot || this.ctx.afterTilda) { + if (node instanceof Func) { + return node.hasParameters() + } + return false + } + + return true + } + + public execute(node: FuncNode, state: ResolveState): boolean { + if (!(node instanceof NamedNode)) return true + + const prefix = state.get("prefix") ?? "" + const rawName = node.name(false) + const name = node.name() + if (name.endsWith("DummyIdentifier")) { + return true + } + + if (!this.allowedInContext(node)) { + return true + } + + const additionalData: CompletionItemAdditionalInformation = { + elementFile: node.file, + file: this.ctx.element.file, + name: name, + language: "func", + } + + if (node instanceof Func) { + // don't add `self.` prefix for global functions + const thisPrefix = prefix + + const signature = node.signaturePresentation(true, true) + const hasNoParams = node.parameters().length === 0 + + const needSemicolon = this.needSemicolon(this.ctx.element.node) + + // We want to place the cursor in parens only if there are any parameters to write. + // and add brackets only if they are not there yet + const parensPart = this.ctx.beforeParen ? "" : hasNoParams ? "()" : "($1)" + const semicolonPart = needSemicolon ? "$2;$0" : "" + const insertText = thisPrefix + rawName + parensPart + semicolonPart + + this.addItem({ + label: thisPrefix + name, + kind: CompletionItemKind.Function, + labelDetails: { + detail: signature, + }, + insertText: insertText, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.FUNCTION, + data: additionalData, + }) + } else if (node instanceof Constant) { + const type = node.node.childForFieldName("type") + const typeName = type?.text ?? "unknown" + + const value = node.value() + + this.addItem({ + label: name, + kind: CompletionItemKind.Constant, + labelDetails: { + detail: ": " + typeName + " = " + (value?.node.text ?? "unknown"), + }, + insertText: rawName, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.CONSTANT, + data: additionalData, + }) + } else if (node instanceof GlobalVariable) { + const type = node.node.childForFieldName("type") + const typeName = type?.text ?? "unknown" + + this.addItem({ + label: name, + kind: CompletionItemKind.Variable, + labelDetails: { + detail: ": " + typeName, + }, + insertText: rawName, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.GLOBAL_VARIABLE, + data: additionalData, + }) + } else if (node.node.type === "identifier") { + const parent = node.node.parent + if (!parent) return true + + if (parent.type === "catch_clause") { + const typeName = "any" + + this.addItem({ + label: name, + kind: CompletionItemKind.Variable, + labelDetails: { + description: ` ${typeName}`, + }, + insertText: rawName, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.VARIABLE, + data: additionalData, + }) + } + } else if (node.node.type === "var_declaration") { + const type = node.node.childForFieldName("type") + const typeName = type?.text ?? "unknown" + + this.addItem({ + label: name, + kind: CompletionItemKind.Variable, + labelDetails: { + description: ` ${typeName}`, + }, + insertText: rawName, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.VARIABLE, + data: additionalData, + }) + } else if (node instanceof Parameter) { + const parent = node.node.parent + if (!parent) return true + + const type = node.typeNode() + const typeName = type?.node.text ?? "unknown" + + this.addItem({ + label: name, + kind: CompletionItemKind.Variable, + labelDetails: { + description: ` ${typeName}`, + }, + insertText: rawName, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.PARAM, + data: additionalData, + }) + } else if (node instanceof TypeParameter) { + this.addItem({ + label: name, + labelDetails: { + description: `type parameter`, + }, + insertText: rawName, + kind: CompletionItemKind.TypeParameter, + weight: CompletionWeight.PARAM, + data: additionalData, + }) + } else { + this.addItem({ + label: name, + insertText: rawName, + weight: CompletionWeight.LOWEST, + }) + } + + return true + } + + private needSemicolon(node: SyntaxNode): boolean { + if (this.ctx.beforeSemicolon || this.ctx.beforeParen) { + return false + } + + if (this.ctx.isStatement) { + return true + } + + const parent = node.parent + + if (parent?.type === "expression_statement") { + // just + // ... + // foo() + // ... + // in block statement + return true + } + + // no need for semicolon + return false + } + + public addItem(node: WeightedCompletionItem): void { + if (node.label === "") return + const lookup = this.lookupString(node) + const prev = this.result.get(lookup) + if (prev && prev.kind === node.kind) return + this.result.set(lookup, node) + } + + private lookupString(item: WeightedCompletionItem): string { + return (item.kind ?? 1).toString() + item.label + } +} diff --git a/server/src/languages/func/completion/WeightedCompletionItem.ts b/server/src/languages/func/completion/WeightedCompletionItem.ts new file mode 100644 index 00000000..ed63a1e2 --- /dev/null +++ b/server/src/languages/func/completion/WeightedCompletionItem.ts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import {CompletionItem} from "vscode-languageserver-types" + +export enum CompletionWeight { + CONTEXT_ELEMENT = 0, + VARIABLE = 50, + PARAM = 60, + KEYWORD = 80, + FUNCTION = 90, + SNIPPET = 95, + CONSTANT = 100, + GLOBAL_VARIABLE = 105, + LOWEST = 500, +} + +export function contextWeight(weight: CompletionWeight, match: boolean): CompletionWeight { + if (match) return weight + return weight + 500 +} + +// eslint-disable-next-line functional/type-declaration-immutability +export type WeightedCompletionItem = CompletionItem & { + readonly weight?: CompletionWeight +} + +export class CompletionResult { + public elements: WeightedCompletionItem[] = [] + + public add(...element: WeightedCompletionItem[]): void { + this.elements.push(...element) + } + + public sorted(): CompletionItem[] { + if (this.elements.length === 0) return [] + + const sorted = this.elements.sort((a, b) => { + if (a.weight === undefined || b.weight === undefined) return 0 + return a.weight - b.weight + }) + + let groupIndex = 0 + let lastWeight = sorted[0].weight ?? 0 + + for (const item of sorted) { + const weight = item.weight as number + if (lastWeight !== weight) { + groupIndex++ + lastWeight = weight + } + + item.sortText = groupIndex.toString() + } + + return sorted + } +} diff --git a/server/src/languages/func/completion/index.ts b/server/src/languages/func/completion/index.ts new file mode 100644 index 00000000..98c56baa --- /dev/null +++ b/server/src/languages/func/completion/index.ts @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core + +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import * as lsp from "vscode-languageserver" +import {createFuncParser} from "@server/parser" +import {getOffsetFromPosition} from "@server/document-store" +import {asParserPoint} from "@server/utils/position" +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {Reference} from "@server/languages/func/psi/Reference" +import {CompletionContext} from "@server/languages/func/completion/CompletionContext" +import {CompletionResult} from "@server/languages/func/completion/WeightedCompletionItem" +import type { + AsyncCompletionProvider, + CompletionProvider, +} from "@server/languages/func/completion/CompletionProvider" +import {ReferenceCompletionProvider} from "@server/languages/func/completion/providers/ReferenceCompletionProvider" +import {ImportPathCompletionProvider} from "@server/languages/func/completion/providers/ImportPathCompletionProvider" +import {TopLevelCompletionProvider} from "@server/languages/func/completion/providers/TopLevelCompletionProvider" + +export async function provideFuncCompletion( + file: FuncFile, + params: lsp.CompletionParams, + uri: string, +): Promise { + const content = file.content + const parser = createFuncParser() + + const offset = getOffsetFromPosition( + content, + params.position.line, + params.position.character + 1, + ) + const start = content.slice(0, offset) + const end = content.slice(offset) + + // Let's say we want to get autocompletion in the following code: + // + // () foo(p builder) { + // p. + // } // ^ caret here + // + // Regular parsers, including those that can recover from errors, will not + // be able to parse this code well enough for us to recognize this situation. + // Some Language Servers try to do this, but they end up with a lot of + // incomprehensible and complex code that doesn't work well. + // + // The approach we use is very simple; instead of parsing the code above, + // we transform it into: + // + // () foo(p builder) { + // p.dummyIdentifier + // } // ^ caret here + // + // Which will be parsed without any problems now. + // + // Now that we have valid code, we can use `Reference.processResolveVariants` + // to resolve `DummyIdentifier` into a list of possible variants, which will + // become the autocompletion list. See `Reference` class documentation. + const newContent = `${start}DummyIdentifier${end}` + const tree = parser.parse(newContent) + if (!tree) return [] + + const cursorPosition = asParserPoint(params.position) + const cursorNode = tree.rootNode.descendantForPosition(cursorPosition) + if ( + cursorNode === null || + (cursorNode.type !== "identifier" && + cursorNode.type !== "type_identifier" && + cursorNode.type !== "string_literal") + ) { + return [] + } + + const element = new NamedNode(cursorNode, new FuncFile(uri, tree, newContent)) + const ref = new Reference(element, false, false) + + const ctx = new CompletionContext( + newContent, + element, + params.position, + params.context?.triggerKind ?? lsp.CompletionTriggerKind.Invoked, + ) + + const result = new CompletionResult() + const providers: CompletionProvider[] = [ + new ReferenceCompletionProvider(ref), + new TopLevelCompletionProvider(), + ] + + for (const provider of providers) { + if (!provider.isAvailable(ctx)) continue + provider.addCompletion(ctx, result) + } + + const asyncProviders: AsyncCompletionProvider[] = [new ImportPathCompletionProvider()] + + for (const provider of asyncProviders) { + if (!provider.isAvailable(ctx)) continue + await provider.addCompletion(ctx, result) + } + return result.sorted() +} diff --git a/server/src/languages/func/completion/providers/ImportPathCompletionProvider.ts b/server/src/languages/func/completion/providers/ImportPathCompletionProvider.ts new file mode 100644 index 00000000..cad73cec --- /dev/null +++ b/server/src/languages/func/completion/providers/ImportPathCompletionProvider.ts @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {AsyncCompletionProvider} from "@server/languages/func/completion/CompletionProvider" +import {CompletionItemKind} from "vscode-languageserver-types" +import type {CompletionContext} from "@server/languages/func/completion/CompletionContext" +import { + CompletionResult, + CompletionWeight, +} from "@server/languages/func/completion/WeightedCompletionItem" +import * as path from "node:path" +import {globalVFS} from "@server/vfs/global" +import {listDirs, listFiles} from "@server/vfs/vfs" +import {filePathToUri} from "@server/files" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {trimSuffix} from "@server/utils/strings" + +export class ImportPathCompletionProvider implements AsyncCompletionProvider { + public isAvailable(ctx: CompletionContext): boolean { + return ctx.insideImport + } + + public async addCompletion(ctx: CompletionContext, result: CompletionResult): Promise { + const file = ctx.element.file + const currentDir = path.dirname(file.path) + + const importPath = trimSuffix(ctx.element.node.text.slice(1, -1), "DummyIdentifier") + + if (importPath.startsWith("./") || importPath.startsWith("../")) { + const targetDir = path.join(currentDir, importPath) + await this.addEntries(targetDir, file, "", result) + return + } + + // On empty path: + // import "" + // or on path without ./ + // import "foo/" + await this.addEntries(path.join(currentDir, importPath) + "/", file, "", result) + } + + private async addEntries( + dir: string, + file: FuncFile, + prefix: string, + result: CompletionResult, + ): Promise { + const [actualDir, namePrefix] = this.splitPath(dir) + + const files = await this.files(actualDir, file) + for (const name of files) { + if (!name.startsWith(namePrefix)) { + // for "./bar/some" + // filter all files that do not start with `some` + continue + } + + const actualInsertName = namePrefix === "" ? `${prefix}${name}` : name + this.addFile(actualInsertName, result) + } + + const dirs = await this.dirs(actualDir) + for (const name of dirs) { + if (!name.startsWith(namePrefix)) { + // for "./bar/some" + // filter all dirs that do not start with `some` + continue + } + + result.add({ + label: name + "/", + kind: CompletionItemKind.Folder, + weight: CompletionWeight.CONTEXT_ELEMENT, + }) + } + } + + private splitPath(path: string): [string, string] { + if (path.endsWith("/") || path.endsWith("\\")) { + // import "./foo/" + return [path, ""] + } + + const lastSlash = path.lastIndexOf("/") + if (lastSlash === -1) { + const lastBackSlash = path.lastIndexOf("\\") + if (lastBackSlash === -1) { + return [path, ""] + } + + const dir = path.slice(0, lastBackSlash) + const name = path.slice(lastBackSlash + 1) + + return [dir, name] + } + + const dir = path.slice(0, lastSlash) + const name = path.slice(lastSlash + 1) + + return [dir, name] + } + + private addFile(name: string, result: CompletionResult): void { + result.add({ + label: name, + kind: CompletionItemKind.File, + weight: CompletionWeight.CONTEXT_ELEMENT, + }) + } + + private async files(dir: string, currentFile: FuncFile): Promise { + try { + const allFiles = await listFiles(globalVFS, filePathToUri(dir)) + return allFiles + .filter(file => file.endsWith(".fc") || file.endsWith(".func")) + .filter(name => name !== currentFile.name) + } catch { + return [] + } + } + + private async dirs(dir: string): Promise { + try { + return await listDirs(globalVFS, filePathToUri(dir)) + } catch { + return [] + } + } +} diff --git a/server/src/languages/func/completion/providers/ReferenceCompletionProvider.ts b/server/src/languages/func/completion/providers/ReferenceCompletionProvider.ts new file mode 100644 index 00000000..0718fcd6 --- /dev/null +++ b/server/src/languages/func/completion/providers/ReferenceCompletionProvider.ts @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type {CompletionProvider} from "@server/languages/func/completion/CompletionProvider" +import type {CompletionContext} from "@server/languages/func/completion/CompletionContext" +import {Reference} from "@server/languages/func/psi/Reference" +import {ReferenceCompletionProcessor} from "@server/languages/func/completion/ReferenceCompletionProcessor" +import type {CompletionResult} from "@server/languages/func/completion/WeightedCompletionItem" +import {ResolveState} from "@server/psi/ResolveState" + +export class ReferenceCompletionProvider implements CompletionProvider { + public constructor(private readonly ref: Reference) {} + + public isAvailable(ctx: CompletionContext): boolean { + return !ctx.topLevel && !ctx.insideImport + } + + public addCompletion(ctx: CompletionContext, result: CompletionResult): void { + const state = new ResolveState() + const processor = new ReferenceCompletionProcessor(ctx) + + this.ref.processResolveVariants(processor, state.withValue("completion", "true")) + result.add(...processor.result.values()) + } +} diff --git a/server/src/languages/func/completion/providers/TopLevelCompletionProvider.ts b/server/src/languages/func/completion/providers/TopLevelCompletionProvider.ts new file mode 100644 index 00000000..88f08020 --- /dev/null +++ b/server/src/languages/func/completion/providers/TopLevelCompletionProvider.ts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {CompletionItemKind, InsertTextFormat} from "vscode-languageserver-types" +import type {CompletionProvider} from "@server/languages/func/completion/CompletionProvider" +import type {CompletionContext} from "@server/languages/func/completion/CompletionContext" +import { + CompletionResult, + CompletionWeight, +} from "@server/languages/func/completion/WeightedCompletionItem" + +export class TopLevelCompletionProvider implements CompletionProvider { + public isAvailable(ctx: CompletionContext): boolean { + return ctx.topLevel + } + + public addCompletion(_ctx: CompletionContext, result: CompletionResult): void { + result.add({ + label: `#include`, + labelDetails: { + detail: ` "";`, + }, + kind: CompletionItemKind.Keyword, + insertText: `#include "$1";$0`, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.KEYWORD, + }) + + result.add({ + label: `#pragma`, + kind: CompletionItemKind.Keyword, + insertText: `#pragma $1;$0`, + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.KEYWORD, + }) + + result.add({ + label: `const`, + labelDetails: { + detail: " FOO = ", + }, + kind: CompletionItemKind.Keyword, + insertText: "const ${1:int} ${2:FOO} = ${3:0};$0", + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.KEYWORD, + }) + + result.add({ + label: `global`, + labelDetails: { + detail: " foo = ", + }, + kind: CompletionItemKind.Keyword, + insertText: "global ${1:int} ${2:foo};$0", + insertTextFormat: InsertTextFormat.Snippet, + weight: CompletionWeight.KEYWORD, + }) + } +} diff --git a/server/src/languages/func/documentation/documentation.ts b/server/src/languages/func/documentation/documentation.ts new file mode 100644 index 00000000..9ba81971 --- /dev/null +++ b/server/src/languages/func/documentation/documentation.ts @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {Constant, Func, GlobalVariable, TypeParameter} from "@server/languages/func/psi/Decls" +import {parentOfType} from "@server/psi/utils" +import type {Node as SyntaxNode} from "web-tree-sitter" + +const CODE_FENCE = "```" +const DOC_TMPL = `${CODE_FENCE}func\n{signature}\n${CODE_FENCE}\n{documentation}\n` + +/** + * Returns the documentation for the given symbol in Markdown format, or null + * if there is no documentation for the element. + * @param node for which we need documentation + * @param _place where symbol is used + */ +export function generateFuncDocFor(node: NamedNode, _place: SyntaxNode): string | null { + const astNode = node.node + + switch (astNode.type) { + case "function_declaration": { + const func = new Func(astNode, node.file) + const doc = node.documentation() + const name = node.namePresentation() + const typeParametersPresentation = func.typeParametersPresentation() + + const returnType = func.returnType() + const returnTypePresentation = returnType?.node.text ?? "()" + + const methodId = func.isGetMethod ? func.computeMethodId() : undefined + const methodIdPresentation = methodId + ? `Method ID: \`0x${methodId.toString(16)}\`\n\n` + : "" + + return defaultResult( + `${typeParametersPresentation}${returnTypePresentation} ${name}${func.signaturePresentation(false, false)}`, + methodIdPresentation + doc, + ) + } + case "constant_declaration": { + const constant = new Constant(astNode, node.file) + const type = node.node.childForFieldName("type") + const typeName = type?.text ?? "unknown" + + const value = constant.value() + if (!value) return null + + const doc = node.documentation() + return defaultResult(`const ${typeName} ${node.name()} = ${value.node.text}`, doc) + } + case "global_var_declaration": { + const variable = new GlobalVariable(astNode, node.file) + const type = variable.typeNode()?.node.text ?? "unknown" + + const doc = node.documentation() + return defaultResult(`global ${type} ${node.name()}`, doc) + } + case "var_declaration": { + const owner = parentOfType(astNode, "local_vars_declaration") + if (!owner) break + + const wholeExpression = owner.parent + if (wholeExpression?.type === "expression_statement") { + return defaultResult(wholeExpression.text) + } + + return defaultResult(owner.text) + } + case "identifier": { + const parent = astNode.parent + if (!parent) return null + + if (parent.type === "catch_clause") { + return defaultResult(`catch (${node.name()})`) + } + break + } + case "parameter_declaration": { + const type = node.node.childForFieldName("type") + const typeName = type?.text ?? "unknown" + + return defaultResult(`${typeName} ${node.name()}`) + } + } + + if (node instanceof TypeParameter) { + const typeParameter = new TypeParameter(node.node, node.file) + const owner = typeParameter.owner() + const ownerPresentation = owner ? owner.kindName() + " " + owner.namePresentation() : "" + + return defaultResult(`${ownerPresentation}\n${node.name()}`) + } + + return null +} + +function defaultResult(signature: string, documentation: string = ""): string { + return DOC_TMPL.replace("{signature}", signature).replace("{documentation}", documentation) +} diff --git a/server/src/languages/func/documentation/index.ts b/server/src/languages/func/documentation/index.ts new file mode 100644 index 00000000..364284dd --- /dev/null +++ b/server/src/languages/func/documentation/index.ts @@ -0,0 +1,63 @@ +import * as lsp from "vscode-languageserver" +import type {Node as SyntaxNode} from "web-tree-sitter" +import {asLspRange} from "@server/utils/position" +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {Reference} from "@server/languages/func/psi/Reference" +import * as docs from "@server/languages/func/documentation/documentation" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {ImportResolver} from "@server/languages/func/psi/ImportResolver" + +export function provideFuncDocumentation(hoverNode: SyntaxNode, file: FuncFile): lsp.Hover | null { + const hoverParent = hoverNode.parent + + if (hoverNode.type === "string_literal" && hoverParent?.type === "import_directive") { + return documentationForImportPath(hoverNode, file) + } + + if (hoverNode.type !== "identifier" && hoverNode.type !== "type_identifier") { + return null + } + + const res = Reference.resolve(NamedNode.create(hoverNode, file)) + if (res === null) { + if (process.env["TON_LS_DEV"] !== "true") { + return null + } + + return { + range: asLspRange(hoverNode), + contents: { + kind: "plaintext", + value: hoverNode.type, + }, + } + } + + const doc = docs.generateFuncDocFor(res, hoverNode) + if (doc === null) return null + + return { + range: asLspRange(hoverNode), + contents: { + kind: "markdown", + value: doc, + }, + } +} + +function documentationForImportPath(hoverNode: SyntaxNode, file: FuncFile): lsp.Hover | null { + const importNode = hoverNode.parent + const importPath = importNode?.childForFieldName("path") + if (!importPath) return null + + const resolvedPath = ImportResolver.resolveNode(file, importPath) + if (resolvedPath === null) return null + + return { + range: asLspRange(hoverNode), + contents: { + kind: "markdown", + value: `\`\`\`func\n#include "${resolvedPath}"\n\`\`\``, + }, + } +} diff --git a/server/src/languages/func/find-definitions/index.ts b/server/src/languages/func/find-definitions/index.ts new file mode 100644 index 00000000..3afec821 --- /dev/null +++ b/server/src/languages/func/find-definitions/index.ts @@ -0,0 +1,72 @@ +import * as lsp from "vscode-languageserver" +import type {Node as SyntaxNode} from "web-tree-sitter" +import {asLspRange} from "@server/utils/position" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {Reference} from "@server/languages/func/psi/Reference" +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {ImportResolver} from "@server/languages/func/psi/ImportResolver" +import {filePathToUri} from "@server/files" +import {existsVFS, globalVFS} from "@server/vfs/files-adapter" + +export async function provideFuncDefinition( + hoverNode: SyntaxNode, + file: FuncFile, +): Promise { + if (hoverNode.type === "string_literal" && hoverNode.parent?.type === "import_directive") { + return resolveImport(file, hoverNode) + } + + if (hoverNode.type !== "identifier" && hoverNode.type !== "type_identifier") { + return [] + } + + const element = NamedNode.create(hoverNode, file) + const res = Reference.resolve(element) + if (!res) { + console.warn(`Cannot find definition for: ${hoverNode.text}`) + return [] + } + + const ident = res.nameIdentifier() + if (ident === null) return [] + + return [ + { + uri: res.file.uri, + range: asLspRange(ident), + }, + ] +} + +async function resolveImport(file: FuncFile, hoverNode: SyntaxNode): Promise { + const importedFile = ImportResolver.resolveNode(file, hoverNode) + if (!importedFile) return [] + + const importedFileUri = filePathToUri(importedFile) + const exists = await existsVFS(globalVFS, importedFileUri) + if (!exists) return [] + + const startOfFile = { + start: {line: 0, character: 0}, + end: {line: 0, character: 0}, + } + + const hoverRange = asLspRange(hoverNode) + return [ + { + targetUri: importedFileUri, + targetRange: startOfFile, + targetSelectionRange: startOfFile, + originSelectionRange: { + start: { + line: hoverRange.start.line, + character: hoverRange.start.character + 1, + }, + end: { + line: hoverRange.end.line, + character: hoverRange.end.character - 1, + }, + }, + }, + ] +} diff --git a/server/src/languages/func/find-references/index.ts b/server/src/languages/func/find-references/index.ts new file mode 100644 index 00000000..3433c990 --- /dev/null +++ b/server/src/languages/func/find-references/index.ts @@ -0,0 +1,36 @@ +import * as lsp from "vscode-languageserver" +import type {Node as SyntaxNode} from "web-tree-sitter" +import {asLspRange} from "@server/utils/position" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {Referent} from "@server/languages/func/psi/Referent" +import {getDocumentSettings} from "@server/settings/settings" + +export async function provideFuncReferences( + referenceNode: SyntaxNode, + file: FuncFile, +): Promise { + if (referenceNode.type !== "identifier" && referenceNode.type !== "type_identifier") { + return [] + } + + const result = new Referent(referenceNode, file).findReferences({ + includeDefinition: false, + }) + if (result.length === 0) return null + + const settings = await getDocumentSettings(file.uri) + if (settings.tolk.findUsages.scope === "workspace") { + // filter out references from stdlib + return result + .filter(value => !value.file.fromStdlib && !value.file.fromStubs) + .map(value => ({ + uri: value.file.uri, + range: asLspRange(value.node), + })) + } + + return result.map(value => ({ + uri: value.file.uri, + range: asLspRange(value.node), + })) +} diff --git a/server/src/languages/func/foldings/index.ts b/server/src/languages/func/foldings/index.ts new file mode 100644 index 00000000..c4b95d3e --- /dev/null +++ b/server/src/languages/func/foldings/index.ts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {FoldingRange, FoldingRangeKind} from "vscode-languageserver-types" +import {RecursiveVisitor} from "@server/visitor/visitor" +import type {Point} from "web-tree-sitter" +import type * as lsp from "vscode-languageserver" +import {FuncFile} from "@server/languages/func/psi/FuncFile" + +export function provideFuncFoldingRanges(file: FuncFile): FoldingRange[] { + const result: FoldingRange[] = [] + + const genericFolding = (start: Point, end: Point): lsp.FoldingRange => { + return { + kind: FoldingRangeKind.Region, + startLine: start.row, + endLine: end.row - 1, + startCharacter: end.column, + endCharacter: end.column, + } + } + + RecursiveVisitor.visit(file.rootNode, (n): boolean => { + if (n.type === "block_statement") { + const openBrace = n.firstChild + const closeBrace = n.lastChild + if (!openBrace || !closeBrace) return true + + result.push(genericFolding(openBrace.endPosition, closeBrace.startPosition)) + } + + return true + }) + + return result +} diff --git a/server/src/languages/func/indexes/index.ts b/server/src/languages/func/indexes/index.ts new file mode 100644 index 00000000..798b0630 --- /dev/null +++ b/server/src/languages/func/indexes/index.ts @@ -0,0 +1,409 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {Constant, Func, GlobalVariable} from "@server/languages/func/psi/Decls" +import {ScopeProcessor} from "@server/languages/func/psi/Reference" +import {FUNC_CACHE} from "@server/languages/func/cache" +import {fileURLToPath} from "node:url" +import {FUNC_PARSED_FILES_CACHE} from "@server/files" +import {ResolveState} from "@server/psi/ResolveState" + +export interface IndexKeyToType { + readonly [IndexKey.GlobalVariables]: GlobalVariable + readonly [IndexKey.Funcs]: Func + readonly [IndexKey.Constants]: Constant +} + +export enum IndexKey { + GlobalVariables = "GlobalVariables", + Funcs = "Funcs", + Constants = "Constants", +} + +export interface IndexFinder { + processElementsByKey: (key: IndexKey, processor: ScopeProcessor, state: ResolveState) => boolean +} + +export class FileIndex { + private readonly elements: { + [IndexKey.GlobalVariables]: GlobalVariable[] + [IndexKey.Funcs]: Func[] + [IndexKey.Constants]: Constant[] + } = { + [IndexKey.GlobalVariables]: [], + [IndexKey.Funcs]: [], + [IndexKey.Constants]: [], + } + + public static create(file: FuncFile): FileIndex { + const index = new FileIndex() + + for (const node of file.rootNode.children) { + if (!node) continue + + if (node.type === "function_declaration") { + index.elements[IndexKey.Funcs].push(new Func(node, file)) + } + if (node.type === "constant_declarations") { + const decls = node.childrenForFieldName("decls") + for (const decl of decls) { + if (!decl) continue + if (decl.type === "constant_declaration") { + const constant = new Constant(decl, file) + index.elements[IndexKey.Constants].push(constant) + } + } + } + if (node.type === "global_var_declarations") { + const decls = node.childrenForFieldName("decls") + for (const decl of decls) { + if (!decl) continue + if (decl.type === "global_var_declaration") { + const variable = new GlobalVariable(decl, file) + index.elements[IndexKey.GlobalVariables].push(variable) + } + } + } + } + + return index + } + + public processElementsByKey( + key: IndexKey, + processor: ScopeProcessor, + state: ResolveState, + ): boolean { + const elements = this.elements[key] + for (const node of elements) { + if (!processor.execute(node, state)) return false + } + return true + } + + public elementByName(key: K, name: string): IndexKeyToType[K] | null { + switch (key) { + case IndexKey.GlobalVariables: { + return this.findElement(this.elements[IndexKey.GlobalVariables], name) as + | IndexKeyToType[K] + | null + } + case IndexKey.Funcs: { + return this.findElement(this.elements[IndexKey.Funcs], name) as + | IndexKeyToType[K] + | null + } + case IndexKey.Constants: { + return this.findElement(this.elements[IndexKey.Constants], name) as + | IndexKeyToType[K] + | null + } + default: { + return null + } + } + } + + public elementsByName(key: K, name: string): IndexKeyToType[K][] { + switch (key) { + case IndexKey.GlobalVariables: { + return this.findElements( + this.elements[IndexKey.GlobalVariables], + name, + ) as IndexKeyToType[K][] + } + case IndexKey.Funcs: { + return this.findElements(this.elements[IndexKey.Funcs], name) as IndexKeyToType[K][] + } + case IndexKey.Constants: { + return this.findElements( + this.elements[IndexKey.Constants], + name, + ) as IndexKeyToType[K][] + } + default: { + return [] + } + } + } + + private findElement(elements: T[], name: string): T | null { + return elements.find(value => value.name() === name) ?? null + } + + private findElements(elements: T[], name: string): T[] { + return elements.filter(value => value.name() === name) + } +} + +export class IndexRoot { + public readonly name: "stdlib" | "stubs" | "workspace" + public readonly root: string + public readonly files: Map = new Map() + + public constructor(name: "stdlib" | "stubs" | "workspace", root: string) { + this.name = name + this.root = root + } + + public contains(file: string): boolean { + if (!file.startsWith("file:")) { + // most likely VS Code temp file can be only in the workspace + return this.name === "workspace" + } + const filepath = fileURLToPath(file) + const rootDir = fileURLToPath(this.root) + return filepath.startsWith(rootDir) + } + + public addFile(uri: string, file: FuncFile, clearCache: boolean = true): void { + if (this.files.has(uri)) { + return + } + + if (clearCache) { + FUNC_CACHE.clear() + } + + const index = FileIndex.create(file) + this.files.set(uri, index) + + console.info(`added ${uri} to index`) + } + + public removeFile(uri: string): void { + FUNC_CACHE.clear() + + this.files.delete(uri) + FUNC_PARSED_FILES_CACHE.delete(uri) + + console.info(`removed ${uri} from index`) + } + + public fileChanged(uri: string): void { + FUNC_CACHE.clear() + this.files.delete(uri) + console.info(`found changes in ${uri}`) + } + + public findFile(uri: string): FileIndex | undefined { + return this.files.get(uri) + } + + public findRelativeFile(path: string): FileIndex | undefined { + const searchPath = this.relativePath(path) + return this.files.get(searchPath) + } + + private relativePath(path: string): string { + if (this.root.endsWith("/") || this.root.endsWith("\\")) { + return this.root + path + } + return this.root + "/" + path + } + + public processElementsByKey( + key: IndexKey, + processor: ScopeProcessor, + state: ResolveState, + ): boolean { + for (const value of this.files.values()) { + if (!value.processElementsByKey(key, processor, state)) return false + } + return true + } + + public processElsByKeyAndFile( + key: IndexKey, + file: FuncFile, + processor: ScopeProcessor, + state: ResolveState, + ): boolean { + const fileIndex = this.files.get(file.uri) + if (fileIndex !== undefined) { + if (!fileIndex.processElementsByKey(key, processor, state)) return false + } + + for (const [k, value] of this.files) { + if (k === file.uri) continue + if (!value.processElementsByKey(key, processor, state)) return false + } + return true + } + + public elementByName(key: K, name: string): IndexKeyToType[K] | null { + for (const value of this.files.values()) { + const result = value.elementByName(key, name) + if (result) { + return result + } + } + return null + } + + public elementsByName(key: K, name: string): IndexKeyToType[K][] { + for (const value of this.files.values()) { + const result = value.elementsByName(key, name) + if (result.length > 0) { + return result + } + } + return [] + } + + public hasDeclaration(name: string): boolean { + for (const value of this.files.values()) { + const element = + value.elementByName(IndexKey.Funcs, name) ?? + value.elementByName(IndexKey.GlobalVariables, name) ?? + value.elementByName(IndexKey.Constants, name) + + if (element) { + return true + } + } + return false + } + + public hasSeveralDeclarations(name: string): boolean { + let seen = false + for (const value of this.files.values()) { + const element = + value.elementByName(IndexKey.Funcs, name) ?? + value.elementByName(IndexKey.Constants, name) ?? + value.elementByName(IndexKey.GlobalVariables, name) + + if (element && seen) { + return true + } + + if (element) { + seen = true + } + } + return false + } +} + +export class GlobalIndex { + public stdlibRoot: IndexRoot | undefined = undefined + public stubsRoot: IndexRoot | undefined = undefined + public roots: IndexRoot[] = [] + + public withStdlibRoot(root: IndexRoot): void { + this.stdlibRoot = root + } + + public withStubsRoot(root: IndexRoot): void { + this.stubsRoot = root + } + + public withRoots(roots: IndexRoot[]): void { + this.roots = roots + } + + public allRoots(): IndexRoot[] { + const roots: IndexRoot[] = [] + if (this.stdlibRoot) { + roots.push(this.stdlibRoot) + } + if (this.stubsRoot) { + roots.push(this.stubsRoot) + } + roots.push(...this.roots) + return roots + } + + public findRootFor(path: string): IndexRoot | undefined { + for (const root of this.allRoots()) { + if (root.contains(path)) { + return root + } + } + + console.warn(`cannot find index root for ${path}`) + return undefined + } + + public addFile(uri: string, file: FuncFile, clearCache: boolean = true): void { + const indexRoot = this.findRootFor(uri) + if (!indexRoot) return + + indexRoot.addFile(uri, file, clearCache) + } + + public removeFile(uri: string): void { + const indexRoot = this.findRootFor(uri) + if (!indexRoot) return + + indexRoot.removeFile(uri) + } + + public fileChanged(uri: string): void { + const indexRoot = this.findRootFor(uri) + if (!indexRoot) return + + indexRoot.fileChanged(uri) + } + + public findFile(uri: string): FileIndex | undefined { + const indexRoot = this.findRootFor(uri) + if (!indexRoot) return undefined + + return indexRoot.findFile(uri) + } + + public processElementsByKey( + key: IndexKey, + processor: ScopeProcessor, + state: ResolveState, + ): boolean { + for (const root of this.allRoots()) { + if (!root.processElementsByKey(key, processor, state)) return false + } + + return true + } + + public processElsByKeyAndFile( + key: IndexKey, + file: FuncFile, + processor: ScopeProcessor, + state: ResolveState, + ): boolean { + for (const root of this.allRoots()) { + if (!root.processElsByKeyAndFile(key, file, processor, state)) return false + } + + return true + } + + public elementByName(key: K, name: string): IndexKeyToType[K] | null { + for (const root of this.allRoots()) { + const element = root.elementByName(key, name) + if (element) return element + } + return null + } + + public hasSeveralDeclarations(name: string): boolean { + let seen = false + for (const root of this.allRoots()) { + const decl = root.hasDeclaration(name) + if (decl && seen) { + return true + } + if (decl) { + const hasSeveralDecls = root.hasSeveralDeclarations(name) + if (hasSeveralDecls) return true + + seen = true + } + } + + return false + } +} + +export const index = new GlobalIndex() diff --git a/server/src/languages/func/inlays/get-method-id.ts b/server/src/languages/func/inlays/get-method-id.ts new file mode 100644 index 00000000..2c09f5a1 --- /dev/null +++ b/server/src/languages/func/inlays/get-method-id.ts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type {Node as SyntaxNode} from "web-tree-sitter" +import * as lsp from "vscode-languageserver-types" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {Func} from "@server/languages/func/psi/Decls" + +export function getMethodId(n: SyntaxNode, file: FuncFile, result: lsp.InlayHint[]): void { + const func = new Func(n, file) + if (!func.isGetMethod || func.hasExplicitMethodId) return + + const specifiers = n.childForFieldName("specifiers") + const methodIdKeyword = specifiers?.children.find(it => it?.type === "method_id") + if (!methodIdKeyword) return + + const actualId = func.computeMethodId() + + result.push({ + kind: lsp.InlayHintKind.Type, + label: `(0x${actualId.toString(16)})`, + position: { + line: methodIdKeyword.endPosition.row, + character: methodIdKeyword.endPosition.column, + }, + }) +} diff --git a/server/src/languages/func/inlays/index.ts b/server/src/languages/func/inlays/index.ts new file mode 100644 index 00000000..eda976d6 --- /dev/null +++ b/server/src/languages/func/inlays/index.ts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import * as lsp from "vscode-languageserver-types" +import {RecursiveVisitor} from "@server/visitor/visitor" +import {getMethodId} from "@server/languages/func/inlays/get-method-id" +import {FuncFile} from "@server/languages/func/psi/FuncFile" + +export function collectFuncInlays( + file: FuncFile, + hints: { + disable: boolean + showMethodId: boolean + }, +): lsp.InlayHint[] | null { + if (hints.disable) return [] + + const result: lsp.InlayHint[] = [] + + RecursiveVisitor.visit(file.rootNode, (n): boolean => { + const type = n.type + + if (type === "function_declaration" && hints.showMethodId) { + getMethodId(n, file, result) + } + + return true + }) + + if (result.length > 0) { + return result + } + + return null +} diff --git a/server/src/languages/func/inspections/Inspection.ts b/server/src/languages/func/inspections/Inspection.ts new file mode 100644 index 00000000..97e12ebe --- /dev/null +++ b/server/src/languages/func/inspections/Inspection.ts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import * as lsp from "vscode-languageserver" +import {FuncFile} from "@server/languages/func/psi/FuncFile" + +export const InspectionIds = { + UNUSED_PARAMETER: "unused-parameter", + UNUSED_TYPE_PARAMETER: "unused-type-parameter", + UNUSED_VARIABLE: "unused-variable", + UNUSED_IMPORT: "unused-import", +} as const + +export type InspectionId = (typeof InspectionIds)[keyof typeof InspectionIds] + +export interface Inspection { + readonly id: InspectionId + inspect(file: FuncFile): Promise | lsp.Diagnostic[] +} diff --git a/server/src/languages/func/inspections/UnusedImportInspection.ts b/server/src/languages/func/inspections/UnusedImportInspection.ts new file mode 100644 index 00000000..5cb9a7b2 --- /dev/null +++ b/server/src/languages/func/inspections/UnusedImportInspection.ts @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import * as lsp from "vscode-languageserver" +import type {FuncFile} from "@server/languages/func/psi/FuncFile" +import {asLspRange} from "@server/utils/position" +import type {Node as SyntaxNode} from "web-tree-sitter" +import {ImportResolver} from "@server/languages/func/psi/ImportResolver" +import {Inspection, InspectionIds} from "./Inspection" + +export class UnusedImportInspection implements Inspection { + public readonly id: "unused-import" = InspectionIds.UNUSED_IMPORT + + public inspect(file: FuncFile): lsp.Diagnostic[] { + if (file.fromStdlib) return [] + const diagnostics: lsp.Diagnostic[] = [] + + const imports: Map< + string, + { + node: SyntaxNode + names: Set + } + > = new Map() + + const importNodes = file.imports() + + for (const imp of importNodes) { + const pathNode = imp.childForFieldName("path") + if (!pathNode) continue + + const importPath = pathNode.text.slice(1, -1) + const importedFile = ImportResolver.resolveAsFile(file, pathNode) + if (!importedFile) continue + + const decls = importedFile.getDecls() + + const names: Set = new Set() + for (const d of decls) { + names.add(d.name()) + } + + imports.set(importPath, { + node: imp, + names, + }) + } + + for (const [importPath, {node, names}] of imports) { + if (!UnusedImportInspection.usedInFile(names, file)) { + diagnostics.push({ + severity: lsp.DiagnosticSeverity.Hint, + range: asLspRange(node), + message: `Include '${importPath}' is never used`, + source: "func", + code: "unused-include", + tags: [lsp.DiagnosticTag.Unnecessary], + }) + } + } + + return diagnostics + } + + private static usedInFile(names: Set, file: FuncFile): boolean { + const lines = file.content.split(/\r?\n/) + + for (const line of lines) { + for (const name of names) { + if (line.includes(";;")) { + // handle cases like this: + // ``` + // bar(); // comment about bar + // ``` + const beforeComment = line.slice(0, line.indexOf("//")) + if (beforeComment.includes(name)) { + return true + } + continue + } + + if (line.includes(name)) { + return true + } + } + } + return false + } +} diff --git a/server/src/languages/func/inspections/UnusedInspection.ts b/server/src/languages/func/inspections/UnusedInspection.ts new file mode 100644 index 00000000..97b8b6ce --- /dev/null +++ b/server/src/languages/func/inspections/UnusedInspection.ts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import * as lsp from "vscode-languageserver" +import type {FuncFile} from "@server/languages/func/psi/FuncFile" +import {asLspRange} from "@server/utils/position" +import {Referent} from "@server/languages/func/psi/Referent" +import type {Node as SyntaxNode} from "web-tree-sitter" + +export abstract class UnusedInspection { + public inspect(file: FuncFile): lsp.Diagnostic[] { + if (file.fromStdlib) return [] + const diagnostics: lsp.Diagnostic[] = [] + this.checkFile(file, diagnostics) + return diagnostics + } + + protected abstract checkFile(file: FuncFile, diagnostics: lsp.Diagnostic[]): void + + protected checkUnused( + node: SyntaxNode | null, + file: FuncFile, + diagnostics: lsp.Diagnostic[], + options: { + kind: string + severity?: lsp.DiagnosticSeverity + code?: string + rangeNode?: SyntaxNode | null + skipIf?: () => boolean + }, + ): void { + if (!node || node.text === "_" || node.text.startsWith("_")) return + + const references = new Referent(node, file).findReferences({limit: 1}) // we need at least one reference + if (references.length === 0) { + const range = asLspRange(options.rangeNode ?? node) + + if (options.skipIf && options.skipIf()) { + return + } + + diagnostics.push({ + severity: options.severity ?? lsp.DiagnosticSeverity.Hint, + range, + message: `${options.kind} '${node.text}' is never used`, + source: "func", + code: options.code ?? "unused", + tags: [lsp.DiagnosticTag.Unnecessary], + }) + } + } +} diff --git a/server/src/languages/func/inspections/UnusedParameterInspection.ts b/server/src/languages/func/inspections/UnusedParameterInspection.ts new file mode 100644 index 00000000..07aff7ad --- /dev/null +++ b/server/src/languages/func/inspections/UnusedParameterInspection.ts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type * as lsp from "vscode-languageserver" +import type {FuncFile} from "@server/languages/func/psi/FuncFile" +import {UnusedInspection} from "./UnusedInspection" +import {Inspection, InspectionIds} from "./Inspection" +import {Func} from "@server/languages/func/psi/Decls" + +export class UnusedParameterInspection extends UnusedInspection implements Inspection { + public readonly id: "unused-parameter" = InspectionIds.UNUSED_PARAMETER + + protected checkFile(file: FuncFile, diagnostics: lsp.Diagnostic[]): void { + for (const fun of file.getFunctions()) { + this.inspectFunction(fun, diagnostics) + } + } + + private inspectFunction(fun: Func, diagnostics: lsp.Diagnostic[]): void { + if (fun.node.childForFieldName("asm_body") !== null) return // skip assembly functions + + for (const param of fun.parameters()) { + const nameIdent = param.nameIdentifier() + if (!nameIdent) continue + + this.checkUnused(param.nameIdentifier(), fun.file, diagnostics, { + kind: "Parameter", + code: "unused-parameter", + rangeNode: nameIdent, + }) + } + } +} diff --git a/server/src/languages/func/inspections/UnusedTypeParameterInspection.ts b/server/src/languages/func/inspections/UnusedTypeParameterInspection.ts new file mode 100644 index 00000000..2e06ecf3 --- /dev/null +++ b/server/src/languages/func/inspections/UnusedTypeParameterInspection.ts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type * as lsp from "vscode-languageserver" +import type {FuncFile} from "@server/languages/func/psi/FuncFile" +import {UnusedInspection} from "./UnusedInspection" +import {Inspection, InspectionIds} from "./Inspection" +import {TypeParameter} from "@server/languages/func/psi/Decls" + +export class UnusedTypeParameterInspection extends UnusedInspection implements Inspection { + public readonly id: "unused-type-parameter" = InspectionIds.UNUSED_TYPE_PARAMETER + + protected checkFile(file: FuncFile, diagnostics: lsp.Diagnostic[]): void { + for (const fun of file.getFunctions()) { + this.checkTypeParameters(fun.typeParameters(), diagnostics) + } + } + + private checkTypeParameters(parameters: TypeParameter[], diagnostics: lsp.Diagnostic[]): void { + for (const param of parameters) { + const name = param.nameIdentifier() + if (!name) continue + + this.checkUnused(name, param.file, diagnostics, { + kind: "Type parameter", + code: "unused-type-parameter", + rangeNode: name, + }) + } + } +} diff --git a/server/src/languages/func/inspections/UnusedVariableInspection.ts b/server/src/languages/func/inspections/UnusedVariableInspection.ts new file mode 100644 index 00000000..41916d30 --- /dev/null +++ b/server/src/languages/func/inspections/UnusedVariableInspection.ts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import type * as lsp from "vscode-languageserver" +import type {FuncFile} from "@server/languages/func/psi/FuncFile" +import {UnusedInspection} from "./UnusedInspection" +import {RecursiveVisitor} from "@server/visitor/visitor" +import {Inspection, InspectionIds} from "./Inspection" + +export class UnusedVariableInspection extends UnusedInspection implements Inspection { + public readonly id: "unused-variable" = InspectionIds.UNUSED_VARIABLE + + protected checkFile(file: FuncFile, diagnostics: lsp.Diagnostic[]): void { + RecursiveVisitor.visit(file.rootNode, (node): boolean => { + if (node.type !== "var_declaration") { + return true + } + + const nameNode = node.childForFieldName("name") + if (!nameNode) return true + this.checkUnused(nameNode, file, diagnostics, { + kind: "Variable", + code: "unused-variable", + }) + + return true + }) + } +} diff --git a/server/src/languages/func/inspections/index.ts b/server/src/languages/func/inspections/index.ts new file mode 100644 index 00000000..958dfda7 --- /dev/null +++ b/server/src/languages/func/inspections/index.ts @@ -0,0 +1,33 @@ +import * as lsp from "vscode-languageserver" +import {connection} from "@server/connection" +import {getDocumentSettings} from "@server/settings/settings" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {UnusedParameterInspection} from "@server/languages/func/inspections/UnusedParameterInspection" +import {UnusedVariableInspection} from "@server/languages/func/inspections/UnusedVariableInspection" +import {UnusedImportInspection} from "@server/languages/func/inspections/UnusedImportInspection" +import {UnusedTypeParameterInspection} from "@server/languages/func/inspections/UnusedTypeParameterInspection" + +export async function runFuncInspections( + uri: string, + file: FuncFile, + _includeLinters: boolean, +): Promise { + const inspections = [ + new UnusedParameterInspection(), + new UnusedTypeParameterInspection(), + new UnusedVariableInspection(), + new UnusedImportInspection(), + ] + + const settings = await getDocumentSettings(uri) + const diagnostics: lsp.Diagnostic[] = [] + + for (const inspection of inspections) { + if (settings.func.inspections.disabled.includes(inspection.id)) { + continue + } + diagnostics.push(...inspection.inspect(file)) + } + + await connection.sendDiagnostics({uri, diagnostics}) +} diff --git a/server/src/languages/func/psi/Decls.ts b/server/src/languages/func/psi/Decls.ts new file mode 100644 index 00000000..a737e7c4 --- /dev/null +++ b/server/src/languages/func/psi/Decls.ts @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {Expression, NamedNode} from "./FuncNode" +import type {Node as SyntaxNode} from "web-tree-sitter" +import {crc16} from "@server/utils/crc16" +import {parentOfType} from "@server/psi/utils" + +export class GlobalVariable extends NamedNode { + public override kindName(): string { + return "global" + } + + public typeNode(): Expression | null { + const value = this.node.childForFieldName("type") + if (!value) return null + return new Expression(value, this.file) + } +} + +export class Constant extends NamedNode { + public override kindName(): string { + return "constant" + } + + public value(): Expression | null { + const value = this.node.childForFieldName("value") + if (!value) return null + return new Expression(value, this.file) + } + + public typeNode(): Expression | null { + const value = this.node.childForFieldName("type") + if (!value) return null + return new Expression(value, this.file) + } + + public hasTypeHint(): boolean { + const node = this.node.childForFieldName("type") + return node !== null + } +} + +export class FunctionBase extends NamedNode { + public returnType(): Expression | null { + const result = this.node.childForFieldName("return_type") + if (!result) return null + return new Expression(result, this.file) + } + + public hasParameters(): boolean { + const parametersNode = this.node.childForFieldName("parameters") + if (!parametersNode) return false + return parametersNode.children.length > 2 + } + + public parameters(): Parameter[] { + const parametersNode = this.node.childForFieldName("parameters") + if (!parametersNode) return [] + + return parametersNode.children + .filter(value => value?.type === "parameter_declaration") + .filter(value => value !== null) + .map(value => new Parameter(value, this.file)) + } + + public typeParameters(): TypeParameter[] { + const typeParametersNode = this.node.childForFieldName("type_parameters") + if (!typeParametersNode) return [] + + return typeParametersNode.children + .filter(value => value?.type === "type_parameter") + .filter(value => value !== null) + .map(value => new TypeParameter(value, this.file)) + } + + public typeParametersPresentation(): string { + const typeParametersNode = this.node.childForFieldName("type_parameters") + if (!typeParametersNode) return "" + return typeParametersNode.text + " " + } + + public signaturePresentation( + withReturnType: boolean = false, + withTypeParameters: boolean = false, + ): string { + const typeParameters = this.node.childForFieldName("type_parameters") + const typeParametersPresentation = + withTypeParameters && typeParameters ? " " + typeParameters.text : "" + + const parametersNode = this.node.childForFieldName("parameters") + if (!parametersNode) return "" + + const result = this.returnType() + return ( + parametersNode.text + + (result && withReturnType ? ` -> ${result.node.text}` : "") + + typeParametersPresentation + ) + } + + public get isGetMethod(): boolean { + const specifiers = this.node.childForFieldName("specifiers") + const methodId = specifiers?.children.find(it => it?.type === "method_id") ?? null + return methodId !== null + } + + public get hasExplicitMethodId(): boolean { + // check for + // @method_id(0x1000) + // ^^^^^^ this + // get fun foo() {} + return this.getExplicitMethodId !== null + } + + public get getExplicitMethodId(): SyntaxNode | null { + // find + // int foo() method_id(0x100) {} + // ^^^^^ this + const specifiers = this.node.childForFieldName("specifiers") + const methodId = specifiers?.children.find(it => it?.type === "method_id") + const value = methodId?.childForFieldName("value") + return value ?? null + } + + public computeMethodId(): number { + const explicitId = this.getExplicitMethodId + if (explicitId) { + return Number.parseInt(explicitId.text) + } + + return (crc16(Buffer.from(this.name())) & 0xff_ff) | 0x1_00_00 + } +} + +export class Func extends FunctionBase { + public override kindName(): string { + return "fun" + } +} + +export class Parameter extends NamedNode { + public override kindName(): string { + return "parameter" + } + + public typeNode(): Expression | null { + const value = this.node.childForFieldName("type") + if (!value) return null + return new Expression(value, this.file) + } +} + +export class TypeParameter extends NamedNode { + public override kindName(): string { + return "" + } + + public owner(): NamedNode | null { + const owner = parentOfType(this.node, "function_declaration") + if (!owner) return null + + if (owner.type === "function_declaration") { + return new Func(owner, this.file) + } + + return new NamedNode(owner, this.file) + } +} diff --git a/server/src/languages/func/psi/FuncFile.ts b/server/src/languages/func/psi/FuncFile.ts new file mode 100644 index 00000000..faaea6f8 --- /dev/null +++ b/server/src/languages/func/psi/FuncFile.ts @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {File} from "@server/psi/File" +import type {Node as SyntaxNode} from "web-tree-sitter" +import {ImportResolver} from "@server/languages/func/psi/ImportResolver" +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {Constant, Func, GlobalVariable} from "@server/languages/func/psi/Decls" +import * as path from "node:path" + +export class FuncFile extends File { + public override get name(): string { + return path.basename(this.path) + } + + public get fromStdlib(): boolean { + return this.uri.includes("stdlib.fc") + } + + public get fromStubs(): boolean { + return this.uri.endsWith("stubs.fc") + } + + public symbolAt(offset: number): string { + return this.content[offset] ?? "" + } + + public importPath(inFile: FuncFile): string { + const filePath = this.path + + const relativeTo = path.dirname(inFile.path) + const relative = path.relative(relativeTo, filePath).replace(/\\/g, "/") + + if (!relative.startsWith("../") && !relative.startsWith("./")) { + return relative + } + + return relative + } + + public imports(): SyntaxNode[] { + return this.tree.rootNode.children + .filter(node => node !== null && node.type === "import_directive") + .filter(node => node !== null) + } + + public importedFiles(): string[] { + const imports = this.imports() + .map(node => node.childForFieldName("path")) + .filter(node => node !== null) + return imports + .map(it => ImportResolver.resolveImport(this, it.text.slice(1, -1))) + .filter(it => it !== null) + } + + public getDecls(): NamedNode[] { + return [...this.getFunctions(), ...this.getConstants(), ...this.getGlobalVariables()] + } + + public getFunctions(): Func[] { + return this.getNodesByType("function_declaration", Func) + } + + public getGlobalVariables(): GlobalVariable[] { + const decls = this.tree.rootNode.children + .filter(node => node !== null && node.type === "global_var_declarations") + .filter(node => node !== null) + + return decls.flatMap(it => + it + .childrenForFieldName("decls") + .filter(it => it?.type === "global_var_declaration") + .filter(it => it !== null) + .map(node => new GlobalVariable(node, this)), + ) + } + + public getConstants(): Constant[] { + const decls = this.tree.rootNode.children + .filter(node => node !== null && node.type === "constant_declarations") + .filter(node => node !== null) + + return decls.flatMap(it => + it + .childrenForFieldName("decls") + .filter(it => it?.type === "constant_declaration") + .filter(it => it !== null) + .map(node => new Constant(node, this)), + ) + } + + private getNodesByType( + nodeType: string | string[], + constructor: new (node: SyntaxNode, file: FuncFile) => T, + ): T[] { + const tree = this.tree + const types = Array.isArray(nodeType) ? nodeType : [nodeType] + + return tree.rootNode.children + .filter(node => node !== null && types.includes(node.type)) + .filter(node => node !== null) + .map(node => new constructor(node, this)) + } +} diff --git a/server/src/languages/func/psi/FuncNode.ts b/server/src/languages/func/psi/FuncNode.ts new file mode 100644 index 00000000..74bb03e2 --- /dev/null +++ b/server/src/languages/func/psi/FuncNode.ts @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type {Node as SyntaxNode} from "web-tree-sitter" +import {FuncFile} from "./FuncFile" +import {BaseNode} from "@server/psi/BaseNode" +import {parentOfType} from "@server/psi/utils" +import {extractCommentsDoc} from "@server/psi/comments" + +export class FuncNode extends BaseNode { + public node: SyntaxNode + public file: FuncFile + + public constructor(node: SyntaxNode, file: FuncFile) { + super() + this.node = node + this.file = file + } +} + +export class Expression extends FuncNode {} + +export class CallLike extends Expression { + public callee(): SyntaxNode | null { + return this.node.childForFieldName("callee") + } + + public calleeName(): SyntaxNode | null { + const callee = this.node.childForFieldName("callee") + if (callee?.type === "identifier") { + return callee + } + if (callee?.type === "dot_access") { + return callee.childForFieldName("field") + } + if (callee?.type === "generic_instantiation") { + return callee + } + if (callee?.type === "function_call") { + const call = new CallLike(callee, this.file) + return call.calleeName() + } + return null + } + + public calleeQualifier(): SyntaxNode | null { + const callee = this.node.childForFieldName("callee") + return this.qualifier(callee) + } + + private qualifier(callee: SyntaxNode | null): SyntaxNode | null { + if (callee?.type === "identifier") { + return null + } + if (callee?.type === "dot_access") { + return callee.childForFieldName("obj") + } + if (callee?.type === "generic_instantiation") { + return this.qualifier(callee.childForFieldName("expr")) + } + if (callee?.type === "function_call") { + return null + } + return null + } + + public rawArguments(): SyntaxNode[] { + const node = this.node.childForFieldName("arguments") + if (!node) return [] + return node.children.filter(it => it !== null) + } + + public arguments(): SyntaxNode[] { + return this.rawArguments().filter(it => it.type === "call_argument") + } +} + +export class NamedNode extends FuncNode { + public static create(node: SyntaxNode, file: FuncFile): NamedNode { + return new NamedNode(node, file) + } + + public nameIdentifier(): SyntaxNode | null { + if (this.node.type === "identifier" || this.node.type === "type_identifier") { + return this.node + } + + const nameNode = this.node.childForFieldName("name") + if (!nameNode) { + return null + } + return nameNode + } + + public nameNode(): NamedNode | null { + const node = this.nameIdentifier() + if (!node) return null + return new NamedNode(node, this.file) + } + + public name(trimBackticks: boolean = true): string { + const ident = this.nameIdentifier() + if (ident === null) return "" + const text = ident.text + if (trimBackticks && text.startsWith("`") && text.endsWith("`")) { + return text.slice(1, -1) + } + return text + } + + public namePresentation(): string { + return this.name(false) + } + + public kindName(): string { + return "decl" + } + + public documentation(): string { + return extractCommentsDoc(this.node) + } +} + +export class VariablesDeclaration extends FuncNode { + public kind(): string { + return this.node.childForFieldName("kind")?.text ?? "val" + } + + public lhs(): SyntaxNode | null { + return this.node.childForFieldName("lhs") + } + + public tupleOrTensor(): boolean { + const lhs = this.lhs() + if (!lhs) return false + return lhs.type === "tuple_vars_declaration" || lhs.type === "tensor_vars_declaration" + } + + public value(): SyntaxNode | null { + return this.node.childForFieldName("assigned_val") + } +} + +export class VarDeclaration extends NamedNode { + public override kindName(): string { + return "var" + } + + public varsDeclaration(): VariablesDeclaration | null { + const decl = parentOfType(this.node, "local_vars_declaration") + if (!decl) return null + return new VariablesDeclaration(decl, this.file) + } + + public typeHint(): Expression | null { + const node = this.node.childForFieldName("type") + if (!node) return null + return new Expression(node, this.file) + } + + public hasTypeHint(): boolean { + const node = this.node.childForFieldName("type") + return node !== null + } + + public value(): Expression | null { + const parentDecl = parentOfType(this.node, "local_vars_declaration") + if (!parentDecl) return null + const val = parentDecl.childForFieldName("assigned_val") + if (!val) return null + return new Expression(val, this.file) + } +} diff --git a/server/src/languages/func/psi/ImportResolver.ts b/server/src/languages/func/psi/ImportResolver.ts new file mode 100644 index 00000000..f5fd0401 --- /dev/null +++ b/server/src/languages/func/psi/ImportResolver.ts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import type {Node as SyntaxNode} from "web-tree-sitter" +import * as path from "node:path" +import type {FuncFile} from "./FuncFile" +import {filePathToUri, FUNC_PARSED_FILES_CACHE} from "@server/files" + +export class ImportResolver { + public static resolveImport(fromFile: FuncFile, importPath: string): string | null { + if (importPath.startsWith("./") || importPath.startsWith("../")) { + return this.resolveLocalPath(fromFile, importPath) + } + + // resolve `#include "foo.fc"` as local as well + return this.resolveLocalPath(fromFile, importPath) + } + + private static resolveLocalPath(file: FuncFile, localPath: string): string | null { + const dir = path.dirname(file.path) + return path.join(dir, localPath) + } + + public static toFile(targetPath: string): FuncFile | null { + const targetUri = filePathToUri(targetPath) + return FUNC_PARSED_FILES_CACHE.get(targetUri) ?? null + } + + public static resolveAsFile(file: FuncFile, pathNode: SyntaxNode): FuncFile | null { + const targetPath = this.resolveImport(file, pathNode.text.slice(1, -1)) + if (!targetPath) return null + return this.toFile(targetPath) + } + + public static resolveNode(file: FuncFile, pathNode: SyntaxNode): string | null { + return this.resolveImport(file, pathNode.text.slice(1, -1)) + } +} diff --git a/server/src/languages/func/psi/Reference.ts b/server/src/languages/func/psi/Reference.ts new file mode 100644 index 00000000..9d403072 --- /dev/null +++ b/server/src/languages/func/psi/Reference.ts @@ -0,0 +1,405 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {Expression, NamedNode, FuncNode, VarDeclaration} from "./FuncNode" +import type {FuncFile} from "./FuncFile" +import {ResolveState} from "@server/psi/ResolveState" +import {FUNC_CACHE} from "@server/languages/func/cache" +import type {Node as SyntaxNode} from "web-tree-sitter" +import { + Constant, + Func, + GlobalVariable, + Parameter, + TypeParameter, +} from "@server/languages/func/psi/Decls" +import {index, IndexFinder, IndexKey} from "@server/languages/func/indexes" +import {ImportResolver} from "@server/languages/func/psi/ImportResolver" +import {filePathToUri} from "@server/files" + +export interface ScopeProcessor { + execute(node: FuncNode, state: ResolveState): boolean +} + +export class Reference { + private readonly element: NamedNode + private readonly skipBlock: boolean + private readonly onlyBlock: boolean + + public static resolve( + node: NamedNode | null, + skipBlock: boolean = false, + onlyBlock: boolean = false, + ): NamedNode | null { + if (node === null) return null + return new Reference(node, skipBlock, onlyBlock).resolve() + } + + public constructor(element: NamedNode, skipBlock: boolean, onlyBlock: boolean) { + this.element = element + + this.skipBlock = skipBlock + this.onlyBlock = onlyBlock + } + + public resolve(): NamedNode | null { + return FUNC_CACHE.resolveCache.cached(this.element.node.id, () => this.resolveImpl()) + } + + private resolveImpl(): NamedNode | null { + if (this.element.node.startIndex === this.element.node.endIndex) return null + + const result: NamedNode[] = [] + const state = new ResolveState() + this.processResolveVariants(Reference.createResolveProcessor(result, this.element), state) + if (result.length === 0) return null + return result[0] + } + + private static createResolveProcessor(result: FuncNode[], element: FuncNode): ScopeProcessor { + return new (class implements ScopeProcessor { + public execute(node: FuncNode, state: ResolveState): boolean { + if (node.node.equals(element.node)) { + result.push(node) + return false + } + + if (!(node instanceof NamedNode) || !(element instanceof NamedNode)) { + return true + } + + const searchName = state.get("search-name") ?? element.name() + + if (node.name() === searchName) { + result.push(node) + return false + } + + return true + } + })() + } + + public processResolveVariants(proc: ScopeProcessor, state: ResolveState): boolean { + if (this.elementIsDeclarationName()) { + // foo: Int + // ^^^ our element + // + // so process whole `foo: Int` node + const parent = this.element.node.parent + if (!parent) return true + return proc.execute(Reference.declarationAstToNode(parent, this.element.file), state) + } + + const qualifier = Reference.getQualifier(this.element) + return qualifier + ? // foo.bar + // ^^^ qualifier + this.processQualifiedExpression(qualifier, proc, state) + : // bar() + // ^ no qualifier + this.processUnqualifiedResolve(proc, state) + } + + private elementIsDeclarationName(): boolean { + // foo: int + // ^^^ maybe this + const identifier = this.element.node + + // foo: int + // ^^^^^^^^ this + const parent = identifier.parent + + // foo: in + // ^^^ this + const name = parent?.childForFieldName("name") + if (!parent || !name) return false + + if (parent.type === "var_declaration") { + if (parent.childForFieldName("redef") !== null) { + // don't treat redef as standalone variable + return false + } + return name.equals(identifier) + } + + // prettier-ignore + return ( + parent.type === "global_var_declaration" || + parent.type === "type_alias_declaration" || + parent.type === "struct_field_declaration" || + parent.type === "parameter_declaration" || + parent.type === "var_declaration" || + parent.type === "struct_declaration" || + parent.type === "function_declaration" || + parent.type === "method_declaration" || + parent.type === "get_method_declaration" || + parent.type === "constant_declaration" + ) && name.equals(identifier) + } + + private static declarationAstToNode(node: SyntaxNode, file: FuncFile): NamedNode { + if (node.type === "constant_declaration") { + return new Constant(node, file) + } + if (node.type === "global_var_declaration") { + return new GlobalVariable(node, file) + } + if (node.type === "function_declaration") { + return new Func(node, file) + } + if (node.type === "var_declaration") { + return new VarDeclaration(node, file) + } + + return new NamedNode(node, file) + } + + private static getQualifier(node: FuncNode): Expression | null { + const parent = node.node.parent + if (!parent) { + return null + } + + if (parent.type === "dot_access") { + const field = parent.childForFieldName("field") + if (field === null) return null + if (!field.equals(node.node)) return null + const qualifier = parent.childForFieldName("obj") + if (!qualifier) return null + return new Expression(qualifier, node.file) + } + + return null + } + + private processQualifiedExpression( + _qualifier: Expression, + _proc: ScopeProcessor, + _state: ResolveState, + ): boolean { + // ... TODO + return true + } + + private processUnqualifiedResolve(proc: ScopeProcessor, state: ResolveState): boolean { + const name = this.element.node.text + if (!name || name === "" || name === "_") return true + + if (this.onlyBlock) { + return this.processBlock(proc, state) + } + + const parent = this.element.node.parent + // foo.bar + // ^^^ this + const isQualifier = parent?.type === "dot_access" + state = state.withValue("dot-qualifier", String(isQualifier)) + + if (!this.skipBlock) { + if (!this.processBlock(proc, state)) return false + } + + return this.processAllEntities(proc, state) + } + + public processBlock(proc: ScopeProcessor, state: ResolveState): boolean { + const file = this.element.file + let descendant: SyntaxNode | null = this.element.node + + let startStatement: SyntaxNode | null = null + + while (descendant) { + // walk all variables inside block + if (descendant.type === "block_statement") { + if (!this.processBlockStatement(descendant, startStatement, proc, file, state)) { + return false + } + } + + // catch (error) + // catch (error, data) + if (descendant.type === "catch_clause") { + const catchVar1 = descendant.childForFieldName("catch_var1") + if (catchVar1) { + if (!proc.execute(new NamedNode(catchVar1, file), state)) return false + } + const catchVar2 = descendant.childForFieldName("catch_var2") + if (catchVar2) { + if (!proc.execute(new NamedNode(catchVar2, file), state)) return false + } + } + + // process parameters of function + if (descendant.type === "function_declaration") { + const rawParameters = descendant.childForFieldName("parameters") + const children = rawParameters?.children ?? [] + if (children.length < 2) break + const params = children.slice(1, -1) + + for (const param of params) { + if (!param) continue + if (!proc.execute(new Parameter(param, file), state)) return false + } + } + + if (descendant.type === "function_declaration") { + const typeParameters = descendant.childForFieldName("type_parameters") + + const children = typeParameters?.children ?? [] + if (children.length < 2) break + const params = children.slice(1, -1) + + for (const param of params) { + if (!param) continue + if (!proc.execute(new TypeParameter(param, file), state)) return false + } + } + + if (descendant.type === "do_while_statement") { + const body = descendant.childForFieldName("body") + if (body) { + if (!this.processBlockStatement(body, startStatement, proc, file, state)) { + return false + } + } + } + + if ( + descendant.type === "local_vars_declaration" || + descendant.type === "expression_statement" + ) { + startStatement = descendant + } + + descendant = descendant.parent + } + + return true + } + + private processBlockStatement( + descendant: SyntaxNode, + startStatement: null | SyntaxNode, + proc: ScopeProcessor, + file: FuncFile, + state: ResolveState, + ): boolean { + const statements = descendant.children + for (const stmt of statements) { + if (!stmt) break + + // reached the starting statement, look no further + if (startStatement && stmt.equals(startStatement)) break + + if (stmt.type === "expression_statement") { + const firstChild = stmt.firstChild + if (firstChild?.type === "local_vars_declaration") { + // var name = expr; + // ^^^^ this + // var [name, other] = expr; + // ^^^^^^^^^^^^^ or this + const lhs = firstChild.childForFieldName("lhs") + if (lhs) { + if (!this.processVariableDeclaration(lhs, proc, file, state)) { + return false + } + } + } + } + } + return true + } + + private processVariableDeclaration( + lhs: SyntaxNode, + proc: ScopeProcessor, + file: FuncFile, + state: ResolveState, + ): boolean { + if (lhs.type === "var_declaration") { + if (lhs.childForFieldName("redef") !== null) { + // don't treat redef as standalone variable + return true + } + if (!proc.execute(new VarDeclaration(lhs, file), state)) return false + } + + if (lhs.type === "tuple_vars_declaration" || lhs.type === "tensor_vars_declaration") { + const vars = lhs.childrenForFieldName("vars") + for (const variable of vars) { + if (!variable) continue + if (!this.processVariableDeclaration(variable, proc, file, state)) return false + } + } + + return true + } + + private processAllEntities(proc: ScopeProcessor, state: ResolveState): boolean { + const file = this.element.file + + if (state.get("completion")) { + if (!index.processElsByKeyAndFile(IndexKey.Funcs, file, proc, state)) return false + if (!index.processElsByKeyAndFile(IndexKey.Constants, file, proc, state)) return false + return index.processElsByKeyAndFile(IndexKey.GlobalVariables, file, proc, state) + } + + // fast path, check the current file + const fileIndex = index.findFile(file.uri) + if (fileIndex && !this.processElsInIndex(proc, state, fileIndex)) return false + + const stubsFile = index.stubsRoot?.findRelativeFile("stubs.fc") + if (stubsFile) { + if (!this.processElsInIndex(proc, state, stubsFile)) return false + } + + // process imported file + for (const path of file.importedFiles()) { + const file = ImportResolver.toFile(path) + if (!file) continue + + const fileIndex = index.findFile(filePathToUri(path)) + if (!fileIndex) continue + + if (!this.processElsInIndex(proc, state, fileIndex)) return false + } + + // process all imports tree + const visited: Set = new Set([file.uri]) + const queue: string[] = file.importedFiles() + + while (queue.length > 0) { + const path = queue.shift() + if (!path) continue + if (visited.has(path)) continue + visited.add(path) + + const file = ImportResolver.toFile(path) + if (!file) continue + + const fileIndex = index.findFile(filePathToUri(path)) + if (!fileIndex) continue + + if (!this.processElsInIndex(proc, state, fileIndex)) continue + + queue.push(...file.importedFiles()) + } + + return true + } + + private processElsInIndex( + proc: ScopeProcessor, + state: ResolveState, + fileIndex: IndexFinder, + ): boolean { + const isQualifier = state.get("dot-qualifier") === "true" + if (!isQualifier) { + // address.foo() + // ^^^^^^^ can be both type and function, resolve only as type + if (!fileIndex.processElementsByKey(IndexKey.Funcs, proc, state)) return false + } + if (!fileIndex.processElementsByKey(IndexKey.GlobalVariables, proc, state)) return false + return fileIndex.processElementsByKey(IndexKey.Constants, proc, state) + } +} diff --git a/server/src/languages/func/psi/Referent.ts b/server/src/languages/func/psi/Referent.ts new file mode 100644 index 00000000..e721a4b0 --- /dev/null +++ b/server/src/languages/func/psi/Referent.ts @@ -0,0 +1,271 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Studio +import type {Node as SyntaxNode} from "web-tree-sitter" +import {RecursiveVisitor} from "@server/visitor/visitor" +import {NamedNode, FuncNode} from "./FuncNode" +import {Reference} from "./Reference" +import type {FuncFile} from "./FuncFile" +import {parentOfType} from "@server/psi/utils" +import {FUNC_PARSED_FILES_CACHE} from "@server/files" + +/** + * Describes a scope that contains all possible uses of a certain symbol. + */ +export interface SearchScope { + toString(): string +} + +/** + * Describes the scope described by some AST node, the search for usages will be + * performed only within this node. + * + * For example, the scope for a local variable will be the block in which it is defined. + */ +export class LocalSearchScope implements SearchScope { + public constructor(public node: SyntaxNode) {} + + public toString(): string { + return `LocalSearchScope:\n${this.node.text}` + } +} + +/** + * Describes a scope consisting of one or more files. + * + * For example, the scope of a global function from the standard library is all project files. + */ +export class GlobalSearchScope implements SearchScope { + public static allFiles(): GlobalSearchScope { + const files = [...FUNC_PARSED_FILES_CACHE.values()] + return new GlobalSearchScope(files) + } + + public constructor(public files: FuncFile[]) {} + + public toString(): string { + return `GlobalSearchScope:\n${this.files.map(f => `- ${f.uri}`).join("\n")}` + } +} + +export interface FindReferenceOptions { + /** + * if true, the first element of the result contains the definition + */ + readonly includeDefinition?: boolean + /** + * if true, don't include `self` as usages (for rename) + */ + readonly includeSelf?: boolean + /** + * if true, only references from the same files listed + */ + readonly sameFileOnly?: boolean + /** + * search stops after `limit` number of references are found + */ + readonly limit?: number +} + +/** + * Referent encapsulates the logic for finding all references to a definition. + * + * The search logic is simple, each symbol has a certain scope in which it can be used. + * If it is a local variable, then the block in which it is defined, if a parameter, then + * the function in which it is defined. If it is a global function, then all project files. + * + * When the scope is defined, it is enough to go through all the nodes from it and find those + * that refer to the searched element. + * For optimization, we do not try to resolve each identifier, we resolve only those that have + * the same name as the searched element (and a bit of logic for processing `self`). + * + * Searching for uses of global symbols can be improved, now we use all files from the index, + * but following the Tolk imports logic, we can reduce the search scope. For example, when searching + * for uses of a global function defined within the project, there is no point in searching + * for its uses within the standard library. + * These optimizations and improvements are the object of further work. + */ +export class Referent { + private readonly resolved: NamedNode | null = null + private readonly file: FuncFile + + public constructor(node: SyntaxNode, file: FuncFile) { + this.file = file + const element = new NamedNode(node, file) + this.resolved = Reference.resolve(element) + } + + /** + * Returns a list of nodes that reference the definition. + */ + public findReferences({ + includeDefinition = false, + sameFileOnly = false, + limit = Infinity, + }: FindReferenceOptions): FuncNode[] { + const resolved = this.resolved + if (!resolved) return [] + + const useScope = this.useScope() + if (!useScope) return [] + + const result: FuncNode[] = [] + if (includeDefinition && (!sameFileOnly || resolved.file.uri === this.file.uri)) { + const nameNode = resolved.nameNode() + if (nameNode) { + result.push(nameNode) + } + } + + this.searchInScope(useScope, sameFileOnly, result, limit) + return result + } + + private searchInScope( + scope: SearchScope, + sameFileOnly: boolean, + result: FuncNode[], + limit: number, + ): void { + if (!this.resolved) return + + if (scope instanceof LocalSearchScope) { + this.traverseTree(this.resolved.file, scope.node, result, limit) + } + + if (scope instanceof GlobalSearchScope) { + if (sameFileOnly) { + this.traverseTree(this.file, this.file.rootNode, result, limit) + return + } + + for (const file of scope.files) { + this.traverseTree(file, file.rootNode, result, limit) + if (result.length === limit) { + break + } + } + } + } + + private traverseTree( + file: FuncFile, + node: SyntaxNode, + result: FuncNode[], + limit: number, + ): void { + const resolved = this.resolved + if (!resolved) return + + // The algorithm for finding references is simple: + // we traverse the node that contains all the uses and resolve + // each identifier with the same name as searched symbol. + // If that identifier refers to the definition we are looking for, + // we add it to the list. + RecursiveVisitor.visit(node, (node): boolean | "stop" => { + // fast path, skip non identifiers + if (node.type !== "identifier" && node.type !== "type_identifier") { + return true + } + // fast path, identifier name doesn't equal to definition name + // self can refer to enclosing method + const nodeName = node.text + if (nodeName !== resolved.name(false)) { + return true + } + + const parent = node.parent + if (parent === null) return true + + // skip definitions itself + // prettier-ignore + if (( + parent.type === "global_var_declaration" || + parent.type === "function_declaration" || + parent.type === "constant_declaration" || + parent.type === "var_declaration" || + parent.type === "type_parameter" || + parent.type === "parameter_declaration") && parent.childForFieldName("name")?.equals(node) + ) { + return true + } + + const target = Reference.resolve(new NamedNode(node, file)) + if (!target) return true + + const identifier = target.nameIdentifier() + if (!identifier) return true + + if ( + target.node.type === resolved.node.type && + target.file.uri === resolved.file.uri && + target.node.startPosition.row === resolved.node.startPosition.row && + identifier.text === resolved.name(false) + ) { + // found new reference + result.push(new FuncNode(node, file)) + if (result.length === limit) return "stop" // end iteration + } + return true + }) + } + + /** + * Returns the effective node in which all possible usages are expected. + * Outside this node, no usages are assumed to exist. For example, a variable + * can be used only in outer block statement where it is defined. + */ + public useScope(): SearchScope | null { + if (!this.resolved) return null + + const node = this.resolved.node + + const parent = this.resolved.node.parent + if (parent === null) return null + + if (node.type === "var_declaration") { + // search only in outer block/function + const ownerBlock = parentOfType(parent, "block_statement") + if (ownerBlock?.parent?.type === "do_while_statement") { + // for + // do { + // var a = 100; + // } until (a); + // search in until condition as well + return Referent.localSearchScope(ownerBlock.parent) + } + return Referent.localSearchScope(ownerBlock) + } + + if (parent.type === "catch_clause") { + // search only in catch block + return Referent.localSearchScope(parent.lastChild) + } + + if (node.type === "parameter_declaration") { + const grand = node.parent?.parent + if (grand?.type === "function_declaration") { + // search in function body + return Referent.localSearchScope(grand.lastChild) + } + } + + if ( + node.type === "global_var_declaration" || + node.type === "function_declaration" || + node.type === "constant_declaration" + ) { + return GlobalSearchScope.allFiles() + } + + if (node.type === "type_parameter") { + return Referent.localSearchScope(parentOfType(parent, "function_declaration")) + } + + return null + } + + private static localSearchScope(node: SyntaxNode | null): SearchScope | null { + if (!node) return null + return new LocalSearchScope(node) + } +} diff --git a/server/src/languages/func/rename/file-renaming.ts b/server/src/languages/func/rename/file-renaming.ts new file mode 100644 index 00000000..ab3cd9ce --- /dev/null +++ b/server/src/languages/func/rename/file-renaming.ts @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {RenameFilesParams} from "vscode-languageserver" +import * as lsp from "vscode-languageserver" +import {ImportResolver} from "@server/languages/func/psi/ImportResolver" +import {asLspRange} from "@server/utils/position" +import {TextEdit} from "vscode-languageserver-types" +import {index} from "@server/languages/func/indexes" +import {filePathToUri, findFuncFile, FUNC_PARSED_FILES_CACHE} from "@server/files" +import {FuncFile} from "@server/languages/func/psi/FuncFile" + +export async function processFuncFileRenaming( + params: RenameFilesParams, +): Promise { + const changes: Record = {} + + for (const fileRename of params.files) { + await processFileRename(fileRename, changes) + } + + return Object.keys(changes).length > 0 ? {changes} : null +} + +export function onFuncFileRenamed(params: RenameFilesParams): void { + for (const fileRename of params.files) { + const oldUri = fileRename.oldUri + const newUri = fileRename.newUri + + if (!oldUri.endsWith(".fc") || !newUri.endsWith(".func")) { + continue + } + + console.info(`File renamed from ${oldUri} to ${newUri}`) + + const file = FUNC_PARSED_FILES_CACHE.get(oldUri) + if (file) { + FUNC_PARSED_FILES_CACHE.delete(oldUri) + const newFile = new FuncFile(newUri, file.tree, file.content) + FUNC_PARSED_FILES_CACHE.set(newUri, newFile) + + index.removeFile(oldUri) + index.addFile(newUri, newFile) + } + } +} + +async function processFileRename( + fileRename: lsp.FileRename, + changes: Record, +): Promise { + const oldUri = fileRename.oldUri + const newUri = fileRename.newUri + + if (!oldUri.endsWith(".fc") && !newUri.endsWith(".func")) { + return + } + + console.info(`Processing rename from ${oldUri} to ${newUri}`) + + // Update imports in the renamed file itself + const renamedFile = FUNC_PARSED_FILES_CACHE.get(oldUri) + if (renamedFile) { + const edits: lsp.TextEdit[] = [] + const newFile = new FuncFile(newUri, renamedFile.tree, renamedFile.content) + + const imports = renamedFile.imports() + for (const importNode of imports) { + const pathNode = importNode.childForFieldName("path") + if (!pathNode) continue + + const importPath = pathNode.text.slice(1, -1) // without quotes + const resolvedPath = ImportResolver.resolveImport(renamedFile, importPath) + if (!resolvedPath) continue + + const targetFile = FUNC_PARSED_FILES_CACHE.get(filePathToUri(resolvedPath)) + if (targetFile) { + const newImportPath = targetFile.importPath(newFile) + const range = asLspRange(pathNode) + + if (newImportPath !== importPath) { + edits.push({ + range, + newText: `"${newImportPath}"`, + }) + + console.info( + `Updating import in renamed file ${newUri}: "${importPath}" -> "${newImportPath}"`, + ) + } + } + } + + if (edits.length > 0) { + changes[oldUri] = edits + } + } + + // Update imports in other files that reference the renamed file + for (const [uri, file] of FUNC_PARSED_FILES_CACHE.entries()) { + if (uri === oldUri) continue // skip the file being renamed + + const imports = file.imports() + const edits: lsp.TextEdit[] = [] + + for (const importNode of imports) { + const pathNode = importNode.childForFieldName("path") + if (!pathNode) continue + + const importPath = pathNode.text.slice(1, -1) // without quotes + const resolvedPath = ImportResolver.resolveImport(file, importPath) + + if (!resolvedPath || filePathToUri(resolvedPath) !== oldUri) { + continue + } + + const oldFile = await findFuncFile(oldUri) + const newFile = new FuncFile(newUri, oldFile.tree, oldFile.content) + const newImportPath = newFile.importPath(file) + const range = asLspRange(pathNode) + + edits.push({ + range, + newText: `"${newImportPath}"`, + }) + + console.info(`Updating import in ${uri}: "${importPath}" -> "${newImportPath}"`) + } + + if (edits.length > 0) { + changes[uri] = edits + } + } +} diff --git a/server/src/languages/func/rename/index.ts b/server/src/languages/func/rename/index.ts new file mode 100644 index 00000000..0a0d151c --- /dev/null +++ b/server/src/languages/func/rename/index.ts @@ -0,0 +1,101 @@ +import * as lsp from "vscode-languageserver" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {DocumentUri, TextEdit, WorkspaceEdit} from "vscode-languageserver-types" +import {Referent} from "@server/languages/func/psi/Referent" +import {asLspRange, asParserPoint} from "@server/utils/position" +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {Reference} from "@server/languages/func/psi/Reference" +import type {Node as SyntaxNode} from "web-tree-sitter" +import type {Position} from "vscode-languageclient" + +export function provideFuncRename(params: lsp.RenameParams, file: FuncFile): WorkspaceEdit | null { + const renameNode = findRenameTarget(params, file) + if (!renameNode) return null + + const result = new Referent(renameNode, file).findReferences({ + includeDefinition: true, + sameFileOnly: false, + includeSelf: false, + }) + if (result.length === 0) return null + + const changes: Record = {} + const newName = params.newName + + for (const node of result) { + const uri = node.file.uri + const element = { + range: asLspRange(node.node), + newText: newName, + } + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + if (changes[uri]) { + changes[uri].push(element) + } else { + changes[uri] = [element] + } + } + + return {changes} +} + +export function provideFuncRenamePrepare( + params: lsp.PrepareRenameParams, + file: FuncFile, +): lsp.PrepareRenameResult | string | null { + const renameNode = findRenameTarget(params, file) + if (!renameNode) return null + if (renameNode.type !== "identifier" && renameNode.type !== "type_identifier") { + return null + } + + const element = NamedNode.create(renameNode, file) + const res = Reference.resolve(element) + if (res === null) return null + + if (res.file.fromStdlib || res.file.fromStubs) { + return `Can not rename element from Standard Library` + } + + return { + range: asLspRange(renameNode), + defaultBehavior: true, + placeholder: renameNode.text, + } +} + +const findRenameTarget = ( + params: lsp.TextDocumentPositionParams, + file: FuncFile, +): SyntaxNode | null => { + const node = nodeAtPosition(params.position, file) + if (node?.type !== "identifier" && node?.type !== "type_identifier") { + // Imagine case: + // + // foo = 10; + // ^^^ selection + // + // position will be point to `:`, not to the last ` o `, so we need to + // move the cursor to the right to find the identifier. + const prevNode = nodeAtPosition( + { + line: params.position.line, + character: params.position.character - 1, + }, + file, + ) + + if (prevNode?.type !== "identifier" && prevNode?.type !== "type_identifier") { + return null + } + + return prevNode + } + return node +} + +function nodeAtPosition(pos: Position, file: FuncFile): SyntaxNode | null { + const cursorPosition = asParserPoint(pos) + return file.rootNode.descendantForPosition(cursorPosition) +} diff --git a/server/src/languages/func/semantic-tokens/index.ts b/server/src/languages/func/semantic-tokens/index.ts new file mode 100644 index 00000000..2833a647 --- /dev/null +++ b/server/src/languages/func/semantic-tokens/index.ts @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2025 TON Core +import {RecursiveVisitor} from "@server/visitor/visitor" +import * as lsp from "vscode-languageserver" +import type {SemanticTokens} from "vscode-languageserver" +import {Tokens} from "@server/semantic/tokens" +import {FuncFile} from "@server/languages/func/psi/FuncFile" +import {Reference} from "@server/languages/func/psi/Reference" +import {NamedNode} from "@server/languages/func/psi/FuncNode" +import {TypeParameter} from "@server/languages/func/psi/Decls" + +export function provideFuncSemanticTokens(file: FuncFile): SemanticTokens { + const tokens = new Tokens() + + RecursiveVisitor.visit(file.rootNode, (n): boolean => { + const type = n.type + + if (type === "global_var_declaration") { + const name = n.childForFieldName("name") + if (!name) return true + tokens.node(name, lsp.SemanticTokenTypes.variable) + return true + } + + if ( + type === "function_declaration" || + type === "method_declaration" || + type === "get_method_declaration" + ) { + const name = n.childForFieldName("name") + if (!name) return true + tokens.node(name, lsp.SemanticTokenTypes.function) + return true + } + + if (type === "type_parameter") { + const name = n.childForFieldName("name") + if (!name) return true + tokens.node(name, lsp.SemanticTokenTypes.typeParameter) + return true + } + + if (type === "parameter_declaration") { + const name = n.childForFieldName("name") + if (!name) return true + + tokens.node(name, lsp.SemanticTokenTypes.parameter) + return true + } + + if (type === "identifier" || type === "type_identifier") { + const name = n.text + if (name === "true" || name === "false") { + tokens.node(n, lsp.SemanticTokenTypes.keyword) + return true + } + + const element = new NamedNode(n, file) + const resolved = Reference.resolve(element) + if (!resolved) return true + const resolvedType = resolved.node.type + + switch (resolvedType) { + case "parameter_declaration": { + tokens.node(n, lsp.SemanticTokenTypes.parameter) + break + } + case "function_declaration": { + tokens.node(n, lsp.SemanticTokenTypes.function) + break + } + case "constant_declaration": { + tokens.node(n, lsp.SemanticTokenTypes.enumMember) + break + } + case "global_var_declaration": { + tokens.node(n, lsp.SemanticTokenTypes.variable) + break + } + default: { + if (resolved instanceof TypeParameter) { + tokens.node(n, lsp.SemanticTokenTypes.typeParameter) + } + } + } + } + + return true + }) + + return { + resultId: Date.now().toString(), + data: tokens.result(), + } +} diff --git a/server/src/languages/func/stubs/stubs.fc b/server/src/languages/func/stubs/stubs.fc new file mode 100644 index 00000000..faff8b76 --- /dev/null +++ b/server/src/languages/func/stubs/stubs.fc @@ -0,0 +1,142 @@ +int _+_(int x, int y) asm "ADD"; +int _-_(int x, int y) asm "SUB"; +int -_(int x) asm "NEGATE"; +int _*_(int x, int y) asm "MUL"; +int _/_(int x, int y) asm "DIV"; +int _~/_(int x, int y) asm "DIVR"; +int _^/_(int x, int y) asm "DIVC"; +int _%_(int x, int y) asm "MOD"; +int _~%_(int x, int y) asm "MODR"; +int _^%_(int x, int y) asm "MODC"; +(int, int) _/%_(int x, int y) asm "DIVMOD"; +(int, int) divmod(int x, int y) asm "DIVMOD"; +(int, int) ~divmod(int x, int y) asm "DIVMOD"; +(int, int) moddiv(int x, int y) asm(x y -> 1 0) "DIVMOD"; +(int, int) ~moddiv(int x, int y) asm(x y -> 1 0) "DIVMOD"; +int _<<_(int x, int y) asm "LSHIFT"; +int _>>_(int x, int y) asm "RSHIFT"; +int _~>>_(int x, int y) asm "RSHIFTR"; +int _^>>_(int x, int y) asm "RSHIFTC"; +int _&_(int x, int y) asm "AND"; +int _|_(int x, int y) asm "OR"; +int _^_(int x, int y) asm "XOR"; +int ~_(int x) asm "NOT"; +int ^_+=_(int x, int y) asm "ADD"; +int ^_-=_(int x, int y) asm "SUB"; +int ^_*=_(int x, int y) asm "MUL"; +int muldiv(int x, int y, int z) asm "MULDIV"; + +;;; `q'=round(x*y/z)` +int muldivr(int x, int y, int z) asm "MULDIVR"; + +int muldivc(int x, int y, int z) asm "MULDIVC"; + +(int, int) muldivmod(int x, int y, int z) asm "MULDIVMOD"; + +int _==_(int x, int y) asm "EQUAL"; + +int _!=_(int x, int y) asm "NEQ"; + +int _<_(int x, int y) asm "LESS"; + +int _>_(int x, int y) asm "GREATER"; + +int _<=_(int x, int y) asm "LEQ"; + +int _>=_(int x, int y) asm "GEQ"; + +int _<=>_(int x, int y) asm "CMP"; + +;;; Checks whether [x] is a _Null_, and returns `-1` or `0` accordingly. +forall X -> int null?(X x) asm "ISNULL"; + +;;; Throws exception [`excno`] with parameter zero. +;;; +;;; In other words, it transfers control to the continuation in `c2`, +;;; pushing `0` and [`excno`] into it's stack, and discarding the old stack altogether. +() throw(int excno) impure asm "THROW"; + +;;; Throws exception [`excno`] with parameter zero only if [`cond`] != `0`. +() throw_if(int excno, int cond) impure asm "THROWARGIF"; + +;;; Throws exception [`excno`] with parameter zero only if [`cond`] == `0`. +() throw_unless(int excno, int cond) impure asm "THROWARGIFNOT"; + +;;; Throws exception [`excno`] with parameter [`x`], +;;; by copying [`x`] and [`excno`] into the stack of `c2` and transferring control to `c2`. +forall X -> () throw_arg(X x, int excno) impure asm "THROWARGANY"; + +;;; Throws exception [`excno`] with parameter [`x`] only if [`cond`] != `0`. +forall X -> () throw_arg_if(X x, int excno, int cond) impure asm "THROWARGANYIF"; + +;;; Throws exception [`excno`] with parameter [`x`] only if [`cond`] == `0`. +forall X -> () throw_arg_unless(X x, int excno, int cond) impure asm "THROWARGANYIFNOT"; + +;;; Loads a signed [`len`]-bit integer from slice [`s`]. +(slice, int) load_int(slice s, int len) asm(s len -> 1 0) "LDIX"; + +;;; Loads a signed [`len`]-bit integer from slice [`s`]. +(slice, int) ~load_int(slice s, int len) asm(s len -> 1 0) "LDIX"; + +;;; Loads a unsigned [`len`]-bit integer from slice [`s`]. +(slice, int) load_uint(slice s, int len) asm(s len -> 1 0) "LDUX"; + +;;; Loads a unsigned [`len`]-bit integer from slice [`s`]. +(slice, int) ~load_uint(slice s, int len) asm(s len -> 1 0) "LDUX"; + +;;; Preloads a signed [`len`]-bit integer from slice [`s`]. +int preload_int(slice s, int len) asm "PLDIX"; + +;;; Preloads an unsigned [`len`]-bit integer from slice [`s`]. +int preload_uint(slice s, int len) asm "PLDUX"; + +;;; Stores a signed [`len`]-bit integer [`x`] into [`b`] for `0 ≤ len ≤ 257`. +builder store_int(builder b, int x, int len) asm(x b len) "STIX"; + +;;; Stores a unsigned [`len`]-bit integer [`x`] into [`b`] for `0 ≤ len ≤ 256`. +builder store_uint(builder b, int x, int len) asm(x b len) "STUX"; + +;;; Loads the first `0` ≤ [`len`] ≤ `1023` bits from slice [`s`] into a separate slice `s''`. +(slice, slice) load_bits(slice s, int len) asm(s len -> 1 0) "LDSLICEX"; + +;;; Preloads the first `0` ≤ [`len`] ≤ `1023` bits from slice [`s`] into a separate slice `s''`. +slice preload_bits(slice s, int len) asm "PLDSLICEX"; + +;;; Returns the [`index`]-th int-element of tuple [`t`]. +int int_at(tuple t, int index) asm "INDEXVAR"; + +;;; Returns the [`index`]-th cell-element of tuple [`t`]. +cell cell_at(tuple t, int index) asm "INDEXVAR"; + +;;; Returns the [`index`]-th slice-element of tuple [`t`]. +slice slice_at(tuple t, int index) asm "INDEXVAR"; + +;;; Returns the [`index`]-th tuple-element of tuple [`t`]. +tuple tuple_at(tuple t, int index) asm "INDEXVAR"; + +;;; Returns the [`index`]-th element of tuple [`t`]. +forall X -> X at(tuple t, int index) asm "INDEXVAR"; + +;;; Moves a variable [x] to the top of the stack. +forall X -> X touch(X x) asm "NOP"; + +;;; Moves a variable [x] to the top of the stack. +forall X -> (X, ()) ~touch(X x) asm "NOP"; + +forall X, Y -> (X, Y) touch2((X, Y) xy) asm "NOP"; + +forall X, Y -> ((X, Y), ()) ~touch2((X, Y) xy) asm "NOP"; + +;;; Dump variable [x] to the debug log. +forall X -> (X, ()) ~dump(X x) impure asm "s0 DUMP"; + +;;; Dump string [x] to the debug log. +forall X -> (X, ()) ~strdump(X x) impure asm "STRDUMP"; + +() run_method0(int id) impure asm "0 CALLXARGS"; + +forall X -> () run_method1(int id, X x) impure asm(x id) "1 CALLXARGS"; + +forall X, Y -> () run_method2(int id, X x, Y y) impure asm(x y id) "2 CALLXARGS"; + +forall X, Y, Z -> () run_method3(int id, X x, Y y, Z z) impure asm(x y z id) "3 CALLXARGS"; diff --git a/server/src/languages/func/symbols/index.ts b/server/src/languages/func/symbols/index.ts new file mode 100644 index 00000000..236639ba --- /dev/null +++ b/server/src/languages/func/symbols/index.ts @@ -0,0 +1,104 @@ +import * as lsp from "vscode-languageserver" +import {SymbolKind} from "vscode-languageserver" +import {NamedNode, FuncNode} from "@server/languages/func/psi/FuncNode" +import {Constant, Func, GlobalVariable} from "@server/languages/func/psi/Decls" +import {asLspRange, asNullableLspRange} from "@server/utils/position" +import {ScopeProcessor} from "@server/languages/func/psi/Reference" +import {index, IndexKey} from "@server/languages/func/indexes" +import {ResolveState} from "@server/psi/ResolveState" +import {FuncFile} from "@server/languages/func/psi/FuncFile" + +export function provideFuncDocumentSymbols(file: FuncFile): lsp.DocumentSymbol[] { + const result: lsp.DocumentSymbol[] = [] + + function symbolDetail(element: NamedNode | Func | Constant | GlobalVariable): string { + if (element instanceof Func) { + return element.signaturePresentation(true, true) + } + if (element instanceof Constant) { + const type = element.typeNode()?.node.text ?? "unknown" + const value = element.value()?.node.text ?? "unknown" + return `: ${type} = ${value}` + } + if (element instanceof GlobalVariable) { + const type = element.typeNode()?.node.text ?? "unknown" + return `: ${type}` + } + return "" + } + + function createSymbol(element: NamedNode): lsp.DocumentSymbol { + const detail = symbolDetail(element) + const kind = symbolKind(element) + + return { + name: symbolName(element), + kind: kind, + range: asLspRange(element.node), + detail: detail, + selectionRange: asNullableLspRange(element.nameIdentifier()), + } + } + + file.imports().forEach(imp => { + result.push({ + name: imp.text, + range: asLspRange(imp), + selectionRange: asLspRange(imp), + kind: SymbolKind.Module, + }) + }) + + file.getFunctions().forEach(n => result.push(createSymbol(n))) + file.getConstants().forEach(n => result.push(createSymbol(n))) + file.getGlobalVariables().forEach(n => result.push(createSymbol(n))) + + return result.sort((a, b) => a.range.start.line - b.range.start.line) +} + +export function provideFuncWorkspaceSymbols(): lsp.WorkspaceSymbol[] { + const result: lsp.WorkspaceSymbol[] = [] + + const state = new ResolveState() + const proc = new (class implements ScopeProcessor { + public execute(node: FuncNode, _state: ResolveState): boolean { + if (!(node instanceof NamedNode)) return true + const nameIdentifier = node.nameIdentifier() + if (!nameIdentifier) return true + + result.push({ + name: symbolName(node), + containerName: "", + kind: symbolKind(node), + location: { + uri: node.file.uri, + range: asLspRange(nameIdentifier), + }, + }) + return true + } + })() + + index.processElementsByKey(IndexKey.GlobalVariables, proc, state) + index.processElementsByKey(IndexKey.Funcs, proc, state) + index.processElementsByKey(IndexKey.Constants, proc, state) + + return result +} + +function symbolName(element: NamedNode): string { + return element.name() +} + +function symbolKind(node: NamedNode): lsp.SymbolKind { + if (node instanceof Func) { + return lsp.SymbolKind.Function + } + if (node instanceof Constant) { + return lsp.SymbolKind.Constant + } + if (node instanceof GlobalVariable) { + return lsp.SymbolKind.Variable + } + return lsp.SymbolKind.Object +} diff --git a/server/src/languages/func/tree-sitter-func/.editorconfig b/server/src/languages/func/tree-sitter-func/.editorconfig new file mode 100644 index 00000000..edb23a3f --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/.editorconfig @@ -0,0 +1,46 @@ +root = true + +[*] +charset = utf-8 + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 4 + +[*.scm] +indent_style = space +indent_size = 2 + +[*.{c,cc,h}] +indent_style = space +indent_size = 4 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{py,pyi}] +indent_style = space +indent_size = 4 + +[*.swift] +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 8 + +[Makefile] +indent_style = tab +indent_size = 8 + +[parser.c] +indent_size = 2 + +[{alloc,array,parser}.h] +indent_size = 2 diff --git a/server/src/languages/func/tree-sitter-func/.gitattributes b/server/src/languages/func/tree-sitter-func/.gitattributes new file mode 100644 index 00000000..79475a5e --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/.gitattributes @@ -0,0 +1,41 @@ +* text=auto eol=lf + +# Generated source files +src/*.json linguist-generated +src/parser.c linguist-generated +src/tree_sitter/* linguist-generated + +# C bindings +bindings/c/** linguist-generated +CMakeLists.txt linguist-generated +Makefile linguist-generated + +# Rust bindings +bindings/rust/* linguist-generated +Cargo.toml linguist-generated +Cargo.lock linguist-generated + +# Node.js bindings +bindings/node/* linguist-generated +binding.gyp linguist-generated +package.json linguist-generated +package-lock.json linguist-generated + +# Python bindings +bindings/python/** linguist-generated +setup.py linguist-generated +pyproject.toml linguist-generated + +# Go bindings +bindings/go/* linguist-generated +go.mod linguist-generated +go.sum linguist-generated + +# Swift bindings +bindings/swift/** linguist-generated +Package.swift linguist-generated +Package.resolved linguist-generated + +# Zig bindings +build.zig linguist-generated +build.zig.zon linguist-generated diff --git a/server/src/languages/func/tree-sitter-func/.gitignore b/server/src/languages/func/tree-sitter-func/.gitignore new file mode 100644 index 00000000..ad49768d --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/.gitignore @@ -0,0 +1,3 @@ +bindings/rust +Cargo.toml +tmp.fc diff --git a/server/src/languages/func/tree-sitter-func/CMakeLists.txt b/server/src/languages/func/tree-sitter-func/CMakeLists.txt new file mode 100644 index 00000000..68dcbd22 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/CMakeLists.txt @@ -0,0 +1,66 @@ +cmake_minimum_required(VERSION 3.13) + +project(tree-sitter-func + VERSION "0.1.0" + DESCRIPTION "Func grammar for tree-sitter" + HOMEPAGE_URL "https://github.com/tree-sitter/tree-sitter-func" + LANGUAGES C) + +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) +option(TREE_SITTER_REUSE_ALLOCATOR "Reuse the library allocator" OFF) + +set(TREE_SITTER_ABI_VERSION 15 CACHE STRING "Tree-sitter ABI version") +if(NOT ${TREE_SITTER_ABI_VERSION} MATCHES "^[0-9]+$") + unset(TREE_SITTER_ABI_VERSION CACHE) + message(FATAL_ERROR "TREE_SITTER_ABI_VERSION must be an integer") +endif() + +find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI") + +add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json" + COMMAND "${TREE_SITTER_CLI}" generate src/grammar.json + --abi=${TREE_SITTER_ABI_VERSION} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generating parser.c") + +add_library(tree-sitter-func src/parser.c) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) + target_sources(tree-sitter-func PRIVATE src/scanner.c) +endif() +target_include_directories(tree-sitter-func + PRIVATE src + INTERFACE $ + $) + +target_compile_definitions(tree-sitter-func PRIVATE + $<$:TREE_SITTER_REUSE_ALLOCATOR> + $<$:TREE_SITTER_DEBUG>) + +set_target_properties(tree-sitter-func + PROPERTIES + C_STANDARD 11 + POSITION_INDEPENDENT_CODE ON + SOVERSION "${TREE_SITTER_ABI_VERSION}.${PROJECT_VERSION_MAJOR}" + DEFINE_SYMBOL "") + +configure_file(bindings/c/tree-sitter-func.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-func.pc" @ONLY) + +include(GNUInstallDirs) + +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree_sitter" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + FILES_MATCHING PATTERN "*.h") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-func.pc" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig") +install(TARGETS tree-sitter-func + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +file(GLOB QUERIES queries/*.scm) +install(FILES ${QUERIES} + DESTINATION "${CMAKE_INSTALL_DATADIR}/tree-sitter/queries/func") + +add_custom_target(ts-test "${TREE_SITTER_CLI}" test + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "tree-sitter test") diff --git a/server/src/languages/func/tree-sitter-func/LICENSE b/server/src/languages/func/tree-sitter-func/LICENSE new file mode 100644 index 00000000..dceaf204 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 akifoq + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/server/src/languages/func/tree-sitter-func/Makefile b/server/src/languages/func/tree-sitter-func/Makefile new file mode 100644 index 00000000..8f914fb9 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/Makefile @@ -0,0 +1,97 @@ +ifeq ($(OS),Windows_NT) +$(error Windows is not supported) +endif + +LANGUAGE_NAME := tree-sitter-func +HOMEPAGE_URL := https://github.com/tree-sitter/tree-sitter-func +VERSION := 0.1.0 + +# repository +SRC_DIR := src + +TS ?= tree-sitter + +# install directory layout +PREFIX ?= /usr/local +DATADIR ?= $(PREFIX)/share +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# source/object files +PARSER := $(SRC_DIR)/parser.c +EXTRAS := $(filter-out $(PARSER),$(wildcard $(SRC_DIR)/*.c)) +OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS)) + +# flags +ARFLAGS ?= rcs +override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC + +# ABI versioning +SONAME_MAJOR = $(shell sed -n 's/\#define LANGUAGE_VERSION //p' $(PARSER)) +SONAME_MINOR = $(word 1,$(subst ., ,$(VERSION))) + +# OS-specific bits +ifeq ($(shell uname),Darwin) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT) + LINKSHARED = -dynamiclib -Wl,-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks +else + SOEXT = so + SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) + SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED = -shared -Wl,-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) +endif +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +endif + +all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc + +lib$(LANGUAGE_NAME).a: $(OBJS) + $(AR) $(ARFLAGS) $@ $^ + +lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) + $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ +ifneq ($(STRIP),) + $(STRIP) $@ +endif + +$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in + sed -e 's|@PROJECT_VERSION@|$(VERSION)|' \ + -e 's|@CMAKE_INSTALL_LIBDIR@|$(LIBDIR:$(PREFIX)/%=%)|' \ + -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \ + -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \ + -e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \ + -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@ + +$(PARSER): $(SRC_DIR)/grammar.json + $(TS) generate $^ + +install: all + install -d '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/func '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' + install -m644 bindings/c/tree_sitter/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a + install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) + install -m644 queries/*.scm '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/func + +uninstall: + $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ + '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ + '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + $(RM) -r '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/func + +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/server/src/languages/func/tree-sitter-func/Package.swift b/server/src/languages/func/tree-sitter-func/Package.swift new file mode 100644 index 00000000..84c851b5 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/Package.swift @@ -0,0 +1,41 @@ +// swift-tools-version:5.3 + +import Foundation +import PackageDescription + +var sources = ["src/parser.c"] +if FileManager.default.fileExists(atPath: "src/scanner.c") { + sources.append("src/scanner.c") +} + +let package = Package( + name: "TreeSitterFunc", + products: [ + .library(name: "TreeSitterFunc", targets: ["TreeSitterFunc"]), + ], + dependencies: [ + .package(url: "https://github.com/tree-sitter/swift-tree-sitter", from: "0.8.0"), + ], + targets: [ + .target( + name: "TreeSitterFunc", + dependencies: [], + path: ".", + sources: sources, + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")] + ), + .testTarget( + name: "TreeSitterFuncTests", + dependencies: [ + "SwiftTreeSitter", + "TreeSitterFunc", + ], + path: "bindings/swift/TreeSitterFuncTests" + ) + ], + cLanguageStandard: .c11 +) diff --git a/server/src/languages/func/tree-sitter-func/README.md b/server/src/languages/func/tree-sitter-func/README.md new file mode 100644 index 00000000..a61cf687 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/README.md @@ -0,0 +1,16 @@ +# tree-sitter-func + +Originally taken from [this repo](https://github.com/akifoq/tree-sitter-func) +and slightly modified to cover all FunC grammar. + +To build grammar (generate C++ parser sources) from command-line, just + +```shell +tree-sitter generate +``` + +To build WASM artifact, launch in project directory: + +```shell +yarn grammar:wasm +``` diff --git a/server/src/languages/func/tree-sitter-func/binding.gyp b/server/src/languages/func/tree-sitter-func/binding.gyp new file mode 100644 index 00000000..46da8578 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/binding.gyp @@ -0,0 +1,19 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_func_binding", + "include_dirs": [ + " +#include "nan.h" + +using namespace v8; + +extern "C" TSLanguage * tree_sitter_func(); + +namespace { + +NAN_METHOD(New) {} + +void Init(Local exports, Local module) { + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("Language").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); + Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_func()); + + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("func").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +} + +NODE_MODULE(tree_sitter_func_binding, Init) + +} // namespace diff --git a/server/src/languages/func/tree-sitter-func/bindings/node/binding_test.js b/server/src/languages/func/tree-sitter-func/bindings/node/binding_test.js new file mode 100644 index 00000000..feea92a3 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/node/binding_test.js @@ -0,0 +1,9 @@ +const assert = require("node:assert") +const {test} = require("node:test") + +const Parser = require("tree-sitter") + +test("can load grammar", () => { + const parser = new Parser() + assert.doesNotThrow(() => parser.setLanguage(require("."))) +}) diff --git a/server/src/languages/func/tree-sitter-func/bindings/node/index.d.ts b/server/src/languages/func/tree-sitter-func/bindings/node/index.d.ts new file mode 100644 index 00000000..58b5d064 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/node/index.d.ts @@ -0,0 +1,27 @@ +type BaseNode = { + type: string + named: boolean +} + +type ChildNode = { + multiple: boolean + required: boolean + types: BaseNode[] +} + +type NodeInfo = + | (BaseNode & { + subtypes: BaseNode[] + }) + | (BaseNode & { + fields: {[name: string]: ChildNode} + children: ChildNode[] + }) + +type Language = { + language: unknown + nodeTypeInfo: NodeInfo[] +} + +declare const language: Language +export = language diff --git a/server/src/languages/func/tree-sitter-func/bindings/node/index.js b/server/src/languages/func/tree-sitter-func/bindings/node/index.js new file mode 100644 index 00000000..ed27852c --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require("../../build/Release/tree_sitter_func_binding") +} catch (error1) { + if (error1.code !== "MODULE_NOT_FOUND") { + throw error1 + } + try { + module.exports = require("../../build/Debug/tree_sitter_func_binding") + } catch (error2) { + if (error2.code !== "MODULE_NOT_FOUND") { + throw error2 + } + throw error1 + } +} + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json") +} catch (_) {} diff --git a/server/src/languages/func/tree-sitter-func/bindings/python/tests/test_binding.py b/server/src/languages/func/tree-sitter-func/bindings/python/tests/test_binding.py new file mode 100644 index 00000000..6288c15e --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/python/tests/test_binding.py @@ -0,0 +1,12 @@ +from unittest import TestCase + +import tree_sitter +import tree_sitter_func + + +class TestLanguage(TestCase): + def test_can_load_grammar(self): + try: + tree_sitter.Language(tree_sitter_func.language()) + except Exception: + self.fail("Error loading FunC grammar") diff --git a/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/__init__.py b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/__init__.py new file mode 100644 index 00000000..f8289bb0 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/__init__.py @@ -0,0 +1,42 @@ +"""Func grammar for tree-sitter""" + +from importlib.resources import files as _files + +from ._binding import language + + +def _get_query(name, file): + query = _files(f"{__package__}.queries") / file + globals()[name] = query.read_text() + return globals()[name] + + +def __getattr__(name): + # NOTE: uncomment these to include any queries that this grammar contains: + + # if name == "HIGHLIGHTS_QUERY": + # return _get_query("HIGHLIGHTS_QUERY", "highlights.scm") + # if name == "INJECTIONS_QUERY": + # return _get_query("INJECTIONS_QUERY", "injections.scm") + # if name == "LOCALS_QUERY": + # return _get_query("LOCALS_QUERY", "locals.scm") + # if name == "TAGS_QUERY": + # return _get_query("TAGS_QUERY", "tags.scm") + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") + + +__all__ = [ + "language", + # "HIGHLIGHTS_QUERY", + # "INJECTIONS_QUERY", + # "LOCALS_QUERY", + # "TAGS_QUERY", +] + + +def __dir__(): + return sorted(__all__ + [ + "__all__", "__builtins__", "__cached__", "__doc__", "__file__", + "__loader__", "__name__", "__package__", "__path__", "__spec__", + ]) diff --git a/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/__init__.pyi b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/__init__.pyi new file mode 100644 index 00000000..abf6633f --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/__init__.pyi @@ -0,0 +1,10 @@ +from typing import Final + +# NOTE: uncomment these to include any queries that this grammar contains: + +# HIGHLIGHTS_QUERY: Final[str] +# INJECTIONS_QUERY: Final[str] +# LOCALS_QUERY: Final[str] +# TAGS_QUERY: Final[str] + +def language() -> object: ... diff --git a/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/binding.c b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/binding.c new file mode 100644 index 00000000..13ec1942 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/binding.c @@ -0,0 +1,35 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_func(void); + +static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { + return PyCapsule_New(tree_sitter_func(), "tree_sitter.Language", NULL); +} + +static struct PyModuleDef_Slot slots[] = { +#ifdef Py_GIL_DISABLED + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, +#endif + {0, NULL} +}; + +static PyMethodDef methods[] = { + {"language", _binding_language, METH_NOARGS, + "Get the tree-sitter language for this grammar."}, + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef module = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_binding", + .m_doc = NULL, + .m_size = 0, + .m_methods = methods, + .m_slots = slots, +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModuleDef_Init(&module); +} diff --git a/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/py.typed b/server/src/languages/func/tree-sitter-func/bindings/python/tree_sitter_func/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/server/src/languages/func/tree-sitter-func/bindings/swift/TreeSitterFunC/func.h b/server/src/languages/func/tree-sitter-func/bindings/swift/TreeSitterFunC/func.h new file mode 100644 index 00000000..afbe6908 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/swift/TreeSitterFunC/func.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_FUNC_H_ +#define TREE_SITTER_FUNC_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_func(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_FUNC_H_ diff --git a/server/src/languages/func/tree-sitter-func/bindings/swift/TreeSitterFunCTests/TreeSitterFunCTests.swift b/server/src/languages/func/tree-sitter-func/bindings/swift/TreeSitterFunCTests/TreeSitterFunCTests.swift new file mode 100644 index 00000000..3a9ef2d6 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/bindings/swift/TreeSitterFunCTests/TreeSitterFunCTests.swift @@ -0,0 +1,12 @@ +import XCTest +import SwiftTreeSitter +import TreeSitterFunc + +final class TreeSitterFuncTests: XCTestCase { + func testCanLoadGrammar() throws { + let parser = Parser() + let language = Language(language: tree_sitter_func()) + XCTAssertNoThrow(try parser.setLanguage(language), + "Error loading FunC grammar") + } +} diff --git a/server/src/languages/func/tree-sitter-func/go.mod b/server/src/languages/func/tree-sitter-func/go.mod new file mode 100644 index 00000000..0d8740d5 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/go.mod @@ -0,0 +1,5 @@ +module github.com/tree-sitter/tree-sitter-func + +go 1.22 + +require github.com/tree-sitter/go-tree-sitter v0.24.0 diff --git a/server/src/languages/func/tree-sitter-func/grammar.js b/server/src/languages/func/tree-sitter-func/grammar.js new file mode 100644 index 00000000..21573e4e --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/grammar.js @@ -0,0 +1,416 @@ +// It's a main grammar description, `tree-sitter generate` works based on this file. +// This grammar describes the latest version of the FunC language for TON Blockchain. +// Originally taken from this repo: https://github.com/akifoq/tree-sitter-func +// and slightly modified to cover all FunC grammar. + +function commaSep(rule) { + return optional(commaSep1(rule)) +} + +function commaSep1(rule) { + return seq(rule, repeat(seq(",", rule))) +} + +function commaSep2(rule) { + return seq(rule, repeat1(seq(",", rule))) +} + +const FUNC_GRAMMAR = { + source_file: $ => repeat($._top_level_item), + + // ---------------------------------------------------------- + // top-level declarations + + _top_level_item: $ => + choice( + $.function_declaration, + $.global_var_declarations, + $.import_directive, + $.pragma_directive, + $.constant_declarations, + $.empty_statement, + ), + + import_directive: $ => + prec.right(seq("#include", repeat1(" "), field("path", $.string_literal), optional(";"))), + + version_identifier: _ => /(>=|<=|=|>|<|\^)?([0-9]+)(.[0-9]+)?(.[0-9]+)?/, + pragma_directive: $ => + seq( + "#pragma", + repeat1(" "), + choice( + seq( + field("key", choice("version", "not-version")), + repeat1(" "), + field("value", $.version_identifier), + ), + field("key", choice("allow-post-modification", "compute-asm-ltr")), + ), + ), + + global_var_declarations: $ => + seq("global", field("decls", commaSep1($.global_var_declaration)), ";"), + global_var_declaration: $ => + seq(field("type", optional($._type_hint)), field("name", $.identifier)), + + constant_declarations: $ => + seq("const", field("decls", commaSep1($.constant_declaration)), ";"), + constant_declaration: $ => + seq( + field("type", optional($._type_hint)), + field("name", $.identifier), + "=", + field("value", choice($._expression)), + ), + + // ---------------------------------------------------------- + // functions and their body + + function_declaration: $ => + seq( + field("type_parameters", optional($.type_parameters)), + field("return_type", $._type_hint), + field("name", $.identifier), + choice( + seq( + field("parameters", $.parameter_list), + field("specifiers", optional($.specifiers_list)), + choice( + field("body", $.block_statement), + field("asm_body", $.asm_function_body), + ), + ), + seq( + field("parameters", $.parameter_list_relaxed), + field("specifiers", optional($.specifiers_list)), + ";", + ), + ), + ), + + impure: _ => "impure", + inline: _ => choice("inline", "inline_ref"), + method_id: $ => + seq( + "method_id", + optional(seq("(", field("value", choice($.number_literal, $.string_literal)), ")")), + ), + + specifiers_list: $ => + choice( + seq($.impure, optional($.inline), optional($.method_id)), + seq($.inline, optional($.method_id)), + $.method_id, + ), + + type_parameters: $ => seq("forall", commaSep($.type_parameter), "->"), + + type_parameter: $ => seq(optional("type"), field("name", $.type_identifier)), + + parameter_list: $ => seq("(", commaSep($.parameter_declaration), ")"), + + parameter_list_relaxed: $ => + seq( + "(", + commaSep( + choice($.parameter_declaration, field("name", choice($.identifier, $.underscore))), + ), + ")", + ), + + parameter_declaration: $ => + seq( + field("type", $._type_hint), + optional(field("name", choice($.identifier, $.underscore))), + ), + + asm_function_body: $ => + seq( + seq( + "asm", + optional( + seq( + "(", + repeat($.identifier), + optional(seq("->", repeat($.number_literal))), + ")", + ), + ), + ), + repeat1($.string_literal), + ";", + ), + + // ---------------------------------------------------------- + // statements + + _statement: $ => + choice( + $.return_statement, + $.block_statement, + $.expression_statement, + $.empty_statement, + $.repeat_statement, + $.if_statement, + $.do_while_statement, + $.while_statement, + $.try_catch_statement, + ), + + return_statement: $ => seq("return", $._expression, ";"), + block_statement: $ => seq("{", repeat($._statement), "}"), + expression_statement: $ => prec.right(seq($._expression, optional(";"))), + empty_statement: _ => ";", + repeat_statement: $ => + seq("repeat", field("count", $._expression), field("body", $.block_statement)), + + if_statement: $ => seq(choice("if", "ifnot"), $._if_statement_contents), + _if_statement_contents: $ => + seq( + field("condition", $._expression), + field("consequent", $.block_statement), + field( + "alternative", + optional( + choice( + seq("else", $.block_statement), + seq(choice("elseif", "elseifnot"), $._if_statement_contents), + ), + ), + ), + ), + + do_while_statement: $ => + seq("do", field("body", $.block_statement), "until", field("postcondition", $._expression)), + while_statement: $ => + seq("while", field("precondition", $._expression), field("body", $.block_statement)), + + try_catch_statement: $ => seq("try", field("body", $.block_statement), $.catch_clause), + catch_clause: $ => + seq( + "catch", + field("catch_expr", optional($._expression)), + field("catch_body", $.block_statement), + ), + + // ---------------------------------------------------------- + // expressions + + _expression: $ => $._expr10, + + _expr10: $ => + prec( + 10, + seq( + $._expr13, + optional( + seq( + choice( + "=", + "+=", + "-=", + "*=", + "/=", + "~/=", + "^/=", + "%=", + "~%=", + "^%=", + "<<=", + ">>=", + "~>>=", + "^>>=", + "&=", + "|=", + "^=", + ), + $._expr10, + ), + ), + ), + ), + + _expr13: $ => prec(13, seq($._expr15, optional(seq("?", $._expression, ":", $._expr13)))), + + _expr15: $ => + prec( + 15, + seq( + $._expr17, + optional(seq(choice("==", "<", ">", "<=", ">=", "!=", "<=>"), $._expr17)), + ), + ), + + _expr17: $ => + prec.left(17, seq($._expr20, repeat(seq(choice("<<", ">>", "~>>", "^>>"), $._expr20)))), + + _expr20: $ => + prec.left( + 20, + seq(optional("-"), $._expr30, repeat(seq(choice("-", "+", "|", "^"), $._expr30))), + ), + + _expr30: $ => + prec.left( + 30, + seq( + $._expr75, + repeat(seq(choice("*", "/", "%", "~/", "^/", "~%", "^%", "/%", "&"), $._expr75)), + ), + ), + + _expr75: $ => prec(75, seq(optional("~"), $._expr80)), + + _expr80: $ => prec.left(80, seq($._expr90, repeat($.method_call))), + method_call: $ => + prec.left( + 80, + seq( + choice(".", "~"), + field("method_name", $.identifier), + field("arguments", $._expr100), + ), + ), + + _expr90: $ => + prec.left(90, choice($._expr100, $.local_vars_declaration, $.function_application)), + function_application: $ => + prec.left( + 90, + seq( + field("callee", $._nontype_expr100), + field( + "arguments", + repeat1(choice($.identifier, $.parenthesized_expression, $.tensor_expression)), + ), + ), + ), + local_vars_declaration: $ => prec.dynamic(90, field("lhs", $._var_declaration_lhs)), + + tuple_vars_declaration: $ => + prec(100, seq("[", field("vars", commaSep1($._var_declaration_lhs)), optional(","), "]")), + tensor_vars_declaration: $ => + prec(100, seq("(", field("vars", commaSep1($._var_declaration_lhs)), optional(","), ")")), + var_declaration: $ => seq(field("type", $._type_hint), field("name", $.identifier)), + + _var_declaration_lhs: $ => + choice($.tuple_vars_declaration, $.tensor_vars_declaration, $.var_declaration), + + type_expression: $ => + prec( + 101, + choice( + $.primitive_type, + $.type_identifier, + $.var_type, + $.parenthesized_type_expression, + $.tensor_type_expression, + $.tuple_type_expression, + ), + ), + parenthesized_type_expression: $ => prec(101, seq("(", $.type_expression, ")")), + tensor_type_expression: $ => prec(101, seq("(", commaSep2($.type_expression), ")")), + tuple_type_expression: $ => prec(101, seq("[", commaSep1($.type_expression), "]")), + + _nontype_expr100: $ => + prec( + 100, + choice( + $.parenthesized_expression, + $.tensor_expression, + $.local_vars_declaration, + $.typed_tuple, + $.identifier, + $.number_literal, + $.string_literal, + $.slice_string_literal, + $.underscore, + ), + ), + + _expr100: $ => prec(100, choice($._nontype_expr100)), + + parenthesized_expression: $ => seq("(", $._expression, ")"), + tensor_expression: $ => choice(seq("(", ")"), seq("(", commaSep2($._expression), ")")), + typed_tuple: $ => seq("[", commaSep($._expression), "]"), + + // ---------------------------------------------------------- + // type system + + _type_hint: $ => choice($._atomic_type, $.function_type), + + function_type: $ => prec.right(100, seq($._atomic_type, "->", $._type_hint)), + + _atomic_type: $ => + choice( + $.primitive_type, + $.var_type, + $.hole_type, + $.type_identifier, + $.tensor_type, + $.tuple_type, + $._parenthesized_type, + ), + + _parenthesized_type: $ => seq("(", $._type_hint, ")"), + + primitive_type: $ => choice("int", "cell", "slice", "builder", "cont", "tuple"), + // constant_type: $ => choice("int", "slice"), + + tensor_type: $ => choice(seq("(", ")"), seq("(", commaSep2($._type_hint), ")")), + + tuple_type: $ => seq("[", commaSep($._type_hint), "]"), + + var_type: _ => "var", + hole_type: $ => alias($.underscore, $.hole_type), + + type_identifier: $ => alias($.identifier, $.type_identifier), + + // ---------------------------------------------------------- + // common constructions + + number_literal: $ => + choice( + token(seq(optional("-"), choice(seq("0x", /[0-9a-fA-F]+/), /[0-9]+/))), + $.number_string_literal, + ), + + string_literal: _ => /"[^"]*"/, + number_string_literal: _ => /"[^"]*"[Hhcu]/, + slice_string_literal: _ => /"[^"]*"[sa]/, + + // actually, FunC identifiers are much more flexible + identifier: _ => /`[^`]+`|[a-zA-Z0-9_\$%][^\s\+\-\*\/%,\.;\(\)\{\}\[\]=<>\|\^\~]*/, + underscore: _ => "_", + + // multiline_comment: $ => seq('{-', repeat(choice(/./, $.multiline_comment)), '-}'), + // unfortunately getting panic while generating parser with support for nested comments + comment: $ => + token( + choice( + seq(";;", /[^\r\n]*/), + seq("//", /[^\r\n]*/), + seq("{-", /[^-]*\-+([^-}][^-]*\-+)*/, "}"), + seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, "/"), + ), + ), +} + +module.exports = grammar({ + name: "func", + + extras: $ => [/\s/, $.comment], + + word: $ => $.identifier, + + rules: FUNC_GRAMMAR, + + conflicts: $ => [ + [$.parameter_list_relaxed, $.type_identifier], + [$.parameter_list_relaxed, $.hole_type], + [$.parameter_list_relaxed, $.parameter_list], + [$.tensor_expression, $.tensor_type], + [$.typed_tuple, $.tuple_type], + ], +}) diff --git a/server/src/languages/func/tree-sitter-func/package.json b/server/src/languages/func/tree-sitter-func/package.json new file mode 100644 index 00000000..3779fa88 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/package.json @@ -0,0 +1,20 @@ +{ + "name": "tree-sitter-func", + "version": "0.4.5", + "description": "FunC grammar for node-tree-sitter", + "main": "bindings/node", + "keywords": [ + "parser", + "lexer" + ], + "author": "akifog and TON Blockchain", + "license": "MIT", + "tree-sitter": [ + { + "scope": "source.fc", + "file-types": [ + "fc" + ] + } + ] +} diff --git a/server/src/languages/func/tree-sitter-func/pyproject.toml b/server/src/languages/func/tree-sitter-func/pyproject.toml new file mode 100644 index 00000000..1a2fcb83 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-func" +description = "Func grammar for tree-sitter" +version = "0.1.0" +keywords = ["incremental", "parsing", "tree-sitter", "func"] +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed", +] +authors = [{ name = "akifog and TON Blockchain" }] +requires-python = ">=3.10" +license.text = "MIT" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/tree-sitter/tree-sitter-func" + +[project.optional-dependencies] +core = ["tree-sitter~=0.24"] + +[tool.cibuildwheel] +build = "cp310-*" +build-frontend = "build" diff --git a/server/src/languages/func/tree-sitter-func/setup.py b/server/src/languages/func/tree-sitter-func/setup.py new file mode 100644 index 00000000..2218e3d6 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/setup.py @@ -0,0 +1,77 @@ +from os import path +from platform import system +from sysconfig import get_config_var + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from setuptools.command.egg_info import egg_info +from wheel.bdist_wheel import bdist_wheel + +sources = [ + "bindings/python/tree_sitter_func/binding.c", + "src/parser.c", +] +if path.exists("src/scanner.c"): + sources.append("src/scanner.c") + +macros: list[tuple[str, str | None]] = [ + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), +] +if limited_api := not get_config_var("Py_GIL_DISABLED"): + macros.append(("Py_LIMITED_API", "0x030A0000")) + +if system() != "Windows": + cflags = ["-std=c11", "-fvisibility=hidden"] +else: + cflags = ["/std:c11", "/utf-8"] + + +class Build(build): + def run(self): + if path.isdir("queries"): + dest = path.join(self.build_lib, "tree_sitter_func", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp"): + python, abi = "cp310", "abi3" + return python, abi, platform + + +class EggInfo(egg_info): + def find_sources(self): + super().find_sources() + self.filelist.recursive_include("queries", "*.scm") + self.filelist.include("src/tree_sitter/*.h") + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_func": ["*.pyi", "py.typed"], + "tree_sitter_func.queries": ["*.scm"], + }, + ext_package="tree_sitter_func", + ext_modules=[ + Extension( + name="_binding", + sources=sources, + extra_compile_args=cflags, + define_macros=macros, + include_dirs=["src"], + py_limited_api=limited_api, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel, + "egg_info": EggInfo, + }, + zip_safe=False +) diff --git a/server/src/languages/func/tree-sitter-func/src/grammar.json b/server/src/languages/func/tree-sitter-func/src/grammar.json new file mode 100644 index 00000000..50e4ba8a --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/src/grammar.json @@ -0,0 +1,2636 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", + "name": "func", + "word": "identifier", + "rules": { + "source_file": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_top_level_item" + } + }, + "_top_level_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_declaration" + }, + { + "type": "SYMBOL", + "name": "global_var_declarations" + }, + { + "type": "SYMBOL", + "name": "import_directive" + }, + { + "type": "SYMBOL", + "name": "pragma_directive" + }, + { + "type": "SYMBOL", + "name": "constant_declarations" + }, + { + "type": "SYMBOL", + "name": "empty_statement" + } + ] + }, + "import_directive": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#include" + }, + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": " " + } + }, + { + "type": "FIELD", + "name": "path", + "content": { + "type": "SYMBOL", + "name": "string_literal" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "version_identifier": { + "type": "PATTERN", + "value": "(>=|<=|=|>|<|\\^)?([0-9]+)(.[0-9]+)?(.[0-9]+)?" + }, + "pragma_directive": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#pragma" + }, + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": " " + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "version" + }, + { + "type": "STRING", + "value": "not-version" + } + ] + } + }, + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": " " + } + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "version_identifier" + } + } + ] + }, + { + "type": "FIELD", + "name": "key", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "allow-post-modification" + }, + { + "type": "STRING", + "value": "compute-asm-ltr" + } + ] + } + } + ] + } + ] + }, + "global_var_declarations": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "global" + }, + { + "type": "FIELD", + "name": "decls", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "global_var_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "global_var_declaration" + } + ] + } + } + ] + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "global_var_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_hint" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "constant_declarations": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "const" + }, + { + "type": "FIELD", + "name": "decls", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constant_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "constant_declaration" + } + ] + } + } + ] + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "constant_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_hint" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + "function_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "_type_hint" + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameter_list" + } + }, + { + "type": "FIELD", + "name": "specifiers", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "specifiers_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + }, + { + "type": "FIELD", + "name": "asm_body", + "content": { + "type": "SYMBOL", + "name": "asm_function_body" + } + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameter_list_relaxed" + } + }, + { + "type": "FIELD", + "name": "specifiers", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "specifiers_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ";" + } + ] + } + ] + } + ] + }, + "impure": { + "type": "STRING", + "value": "impure" + }, + "inline": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "inline" + }, + { + "type": "STRING", + "value": "inline_ref" + } + ] + }, + "method_id": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "method_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "number_literal" + }, + { + "type": "SYMBOL", + "name": "string_literal" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "specifiers_list": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "impure" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "inline" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "method_id" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "inline" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "method_id" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "method_id" + } + ] + }, + "type_parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "forall" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameter" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "type_parameter" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "->" + } + ] + }, + "type_parameter": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "type_identifier" + } + } + ] + }, + "parameter_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "parameter_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "parameter_declaration" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parameter_list_relaxed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter_declaration" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "underscore" + } + ] + } + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter_declaration" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "underscore" + } + ] + } + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parameter_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type_hint" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "underscore" + } + ] + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "asm_function_body": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "asm" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "->" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "number_literal" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "string_literal" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "return_statement" + }, + { + "type": "SYMBOL", + "name": "block_statement" + }, + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "empty_statement" + }, + { + "type": "SYMBOL", + "name": "repeat_statement" + }, + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "do_while_statement" + }, + { + "type": "SYMBOL", + "name": "while_statement" + }, + { + "type": "SYMBOL", + "name": "try_catch_statement" + } + ] + }, + "return_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "block_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "expression_statement": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "empty_statement": { + "type": "STRING", + "value": ";" + }, + "repeat_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "repeat" + }, + { + "type": "FIELD", + "name": "count", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + } + ] + }, + "if_statement": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "STRING", + "value": "ifnot" + } + ] + }, + { + "type": "SYMBOL", + "name": "_if_statement_contents" + } + ] + }, + "_if_statement_contents": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "consequent", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "SYMBOL", + "name": "block_statement" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "elseif" + }, + { + "type": "STRING", + "value": "elseifnot" + } + ] + }, + { + "type": "SYMBOL", + "name": "_if_statement_contents" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + } + ] + }, + "do_while_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + }, + { + "type": "STRING", + "value": "until" + }, + { + "type": "FIELD", + "name": "postcondition", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + "while_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "precondition", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + } + ] + }, + "try_catch_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "try" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + }, + { + "type": "SYMBOL", + "name": "catch_clause" + } + ] + }, + "catch_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "catch" + }, + { + "type": "FIELD", + "name": "catch_expr", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "catch_body", + "content": { + "type": "SYMBOL", + "name": "block_statement" + } + } + ] + }, + "_expression": { + "type": "SYMBOL", + "name": "_expr10" + }, + "_expr10": { + "type": "PREC", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr13" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + }, + { + "type": "STRING", + "value": "*=" + }, + { + "type": "STRING", + "value": "/=" + }, + { + "type": "STRING", + "value": "~/=" + }, + { + "type": "STRING", + "value": "^/=" + }, + { + "type": "STRING", + "value": "%=" + }, + { + "type": "STRING", + "value": "~%=" + }, + { + "type": "STRING", + "value": "^%=" + }, + { + "type": "STRING", + "value": "<<=" + }, + { + "type": "STRING", + "value": ">>=" + }, + { + "type": "STRING", + "value": "~>>=" + }, + { + "type": "STRING", + "value": "^>>=" + }, + { + "type": "STRING", + "value": "&=" + }, + { + "type": "STRING", + "value": "|=" + }, + { + "type": "STRING", + "value": "^=" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr10" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "_expr13": { + "type": "PREC", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr15" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_expr13" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "_expr15": { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr17" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "==" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "STRING", + "value": ">=" + }, + { + "type": "STRING", + "value": "!=" + }, + { + "type": "STRING", + "value": "<=>" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr17" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "_expr17": { + "type": "PREC_LEFT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr20" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "<<" + }, + { + "type": "STRING", + "value": ">>" + }, + { + "type": "STRING", + "value": "~>>" + }, + { + "type": "STRING", + "value": "^>>" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr20" + } + ] + } + } + ] + } + }, + "_expr20": { + "type": "PREC_LEFT", + "value": 20, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr30" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "STRING", + "value": "^" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr30" + } + ] + } + } + ] + } + }, + "_expr30": { + "type": "PREC_LEFT", + "value": 30, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr75" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "STRING", + "value": "%" + }, + { + "type": "STRING", + "value": "~/" + }, + { + "type": "STRING", + "value": "^/" + }, + { + "type": "STRING", + "value": "~%" + }, + { + "type": "STRING", + "value": "^%" + }, + { + "type": "STRING", + "value": "/%" + }, + { + "type": "STRING", + "value": "&" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr75" + } + ] + } + } + ] + } + }, + "_expr75": { + "type": "PREC", + "value": 75, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expr80" + } + ] + } + }, + "_expr80": { + "type": "PREC_LEFT", + "value": 80, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expr90" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "method_call" + } + } + ] + } + }, + "method_call": { + "type": "PREC_LEFT", + "value": 80, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "STRING", + "value": "~" + } + ] + }, + { + "type": "FIELD", + "name": "method_name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "SYMBOL", + "name": "_expr100" + } + } + ] + } + }, + "_expr90": { + "type": "PREC_LEFT", + "value": 90, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expr100" + }, + { + "type": "SYMBOL", + "name": "local_vars_declaration" + }, + { + "type": "SYMBOL", + "name": "function_application" + } + ] + } + }, + "function_application": { + "type": "PREC_LEFT", + "value": 90, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "callee", + "content": { + "type": "SYMBOL", + "name": "_nontype_expr100" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "tensor_expression" + } + ] + } + } + } + ] + } + }, + "local_vars_declaration": { + "type": "PREC_DYNAMIC", + "value": 90, + "content": { + "type": "FIELD", + "name": "lhs", + "content": { + "type": "SYMBOL", + "name": "_var_declaration_lhs" + } + } + }, + "tuple_vars_declaration": { + "type": "PREC", + "value": 100, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "vars", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_var_declaration_lhs" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_var_declaration_lhs" + } + ] + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "tensor_vars_declaration": { + "type": "PREC", + "value": 100, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "vars", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_var_declaration_lhs" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_var_declaration_lhs" + } + ] + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "var_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type_hint" + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "_var_declaration_lhs": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "tuple_vars_declaration" + }, + { + "type": "SYMBOL", + "name": "tensor_vars_declaration" + }, + { + "type": "SYMBOL", + "name": "var_declaration" + } + ] + }, + "type_expression": { + "type": "PREC", + "value": 101, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "primitive_type" + }, + { + "type": "SYMBOL", + "name": "type_identifier" + }, + { + "type": "SYMBOL", + "name": "var_type" + }, + { + "type": "SYMBOL", + "name": "parenthesized_type_expression" + }, + { + "type": "SYMBOL", + "name": "tensor_type_expression" + }, + { + "type": "SYMBOL", + "name": "tuple_type_expression" + } + ] + } + }, + "parenthesized_type_expression": { + "type": "PREC", + "value": 101, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "type_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "tensor_type_expression": { + "type": "PREC", + "value": 101, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "type_expression" + }, + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "type_expression" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "tuple_type_expression": { + "type": "PREC", + "value": 101, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "type_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "type_expression" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "_nontype_expr100": { + "type": "PREC", + "value": 100, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "tensor_expression" + }, + { + "type": "SYMBOL", + "name": "local_vars_declaration" + }, + { + "type": "SYMBOL", + "name": "typed_tuple" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "number_literal" + }, + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "SYMBOL", + "name": "slice_string_literal" + }, + { + "type": "SYMBOL", + "name": "underscore" + } + ] + } + }, + "_expr100": { + "type": "PREC", + "value": 100, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_nontype_expr100" + } + ] + } + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "tensor_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "typed_tuple": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "_type_hint": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_atomic_type" + }, + { + "type": "SYMBOL", + "name": "function_type" + } + ] + }, + "function_type": { + "type": "PREC_RIGHT", + "value": 100, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_atomic_type" + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_type_hint" + } + ] + } + }, + "_atomic_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "primitive_type" + }, + { + "type": "SYMBOL", + "name": "var_type" + }, + { + "type": "SYMBOL", + "name": "hole_type" + }, + { + "type": "SYMBOL", + "name": "type_identifier" + }, + { + "type": "SYMBOL", + "name": "tensor_type" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + }, + { + "type": "SYMBOL", + "name": "_parenthesized_type" + } + ] + }, + "_parenthesized_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type_hint" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "primitive_type": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "int" + }, + { + "type": "STRING", + "value": "cell" + }, + { + "type": "STRING", + "value": "slice" + }, + { + "type": "STRING", + "value": "builder" + }, + { + "type": "STRING", + "value": "cont" + }, + { + "type": "STRING", + "value": "tuple" + } + ] + }, + "tensor_type": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_hint" + }, + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_hint" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "tuple_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_hint" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_hint" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "var_type": { + "type": "STRING", + "value": "var" + }, + "hole_type": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "underscore" + }, + "named": true, + "value": "hole_type" + }, + "type_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "type_identifier" + }, + "number_literal": { + "type": "CHOICE", + "members": [ + { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "PATTERN", + "value": "[0-9a-fA-F]+" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-9]+" + } + ] + } + ] + } + }, + { + "type": "SYMBOL", + "name": "number_string_literal" + } + ] + }, + "string_literal": { + "type": "PATTERN", + "value": "\"[^\"]*\"" + }, + "number_string_literal": { + "type": "PATTERN", + "value": "\"[^\"]*\"[Hhcu]" + }, + "slice_string_literal": { + "type": "PATTERN", + "value": "\"[^\"]*\"[sa]" + }, + "identifier": { + "type": "PATTERN", + "value": "`[^`]+`|[a-zA-Z0-9_\\$%][^\\s\\+\\-\\*\\/%,\\.;\\(\\)\\{\\}\\[\\]=<>\\|\\^\\~]*" + }, + "underscore": { + "type": "STRING", + "value": "_" + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";;" + }, + { + "type": "PATTERN", + "value": "[^\\r\\n]*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "//" + }, + { + "type": "PATTERN", + "value": "[^\\r\\n]*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{-" + }, + { + "type": "PATTERN", + "value": "[^-]*\\-+([^-}][^-]*\\-+)*" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/*" + }, + { + "type": "PATTERN", + "value": "[^*]*\\*+([^/*][^*]*\\*+)*" + }, + { + "type": "STRING", + "value": "/" + } + ] + } + ] + } + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + }, + { + "type": "SYMBOL", + "name": "comment" + } + ], + "conflicts": [ + ["parameter_list_relaxed", "type_identifier"], + ["parameter_list_relaxed", "hole_type"], + ["parameter_list_relaxed", "parameter_list"], + ["tensor_expression", "tensor_type"], + ["typed_tuple", "tuple_type"] + ], + "precedences": [], + "externals": [], + "inline": [], + "supertypes": [], + "reserved": {} +} diff --git a/server/src/languages/func/tree-sitter-func/src/node-types.json b/server/src/languages/func/tree-sitter-func/src/node-types.json new file mode 100644 index 00000000..0373b81e --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/src/node-types.json @@ -0,0 +1,3414 @@ +[ + { + "type": "asm_function_body", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + } + ] + } + }, + { + "type": "block_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "block_statement", + "named": true + }, + { + "type": "do_while_statement", + "named": true + }, + { + "type": "empty_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "repeat_statement", + "named": true + }, + { + "type": "return_statement", + "named": true + }, + { + "type": "try_catch_statement", + "named": true + }, + { + "type": "while_statement", + "named": true + } + ] + } + }, + { + "type": "catch_clause", + "named": true, + "fields": { + "catch_body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + }, + "catch_expr": { + "multiple": true, + "required": false, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + } + } + }, + { + "type": "constant_declaration", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": false, + "types": [ + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + }, + "value": { + "multiple": true, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + } + } + }, + { + "type": "constant_declarations", + "named": true, + "fields": { + "decls": { + "multiple": true, + "required": true, + "types": [ + { + "type": ",", + "named": false + }, + { + "type": "constant_declaration", + "named": true + } + ] + } + } + }, + { + "type": "do_while_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + }, + "postcondition": { + "multiple": true, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + } + } + }, + { + "type": "empty_statement", + "named": true, + "fields": {} + }, + { + "type": "expression_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + }, + { + "type": "function_application", + "named": true, + "fields": { + "arguments": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "tensor_expression", + "named": true + } + ] + }, + "callee": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + } + }, + { + "type": "function_declaration", + "named": true, + "fields": { + "asm_body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "asm_function_body", + "named": true + } + ] + }, + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parameter_list", + "named": true + }, + { + "type": "parameter_list_relaxed", + "named": true + } + ] + }, + "return_type": { + "multiple": true, + "required": true, + "types": [ + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + }, + "specifiers": { + "multiple": false, + "required": false, + "types": [ + { + "type": "specifiers_list", + "named": true + } + ] + }, + "type_parameters": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_parameters", + "named": true + } + ] + } + } + }, + { + "type": "function_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + } + }, + { + "type": "global_var_declaration", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": false, + "types": [ + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + } + } + }, + { + "type": "global_var_declarations", + "named": true, + "fields": { + "decls": { + "multiple": true, + "required": true, + "types": [ + { + "type": ",", + "named": false + }, + { + "type": "global_var_declaration", + "named": true + } + ] + } + } + }, + { + "type": "hole_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "hole_type", + "named": true + } + ] + } + }, + { + "type": "if_statement", + "named": true, + "fields": { + "alternative": { + "multiple": true, + "required": false, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "block_statement", + "named": true + }, + { + "type": "else", + "named": false + }, + { + "type": "elseif", + "named": false + }, + { + "type": "elseifnot", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + }, + "condition": { + "multiple": true, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + }, + "consequent": { + "multiple": true, + "required": true, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + } + } + }, + { + "type": "import_directive", + "named": true, + "fields": { + "path": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string_literal", + "named": true + } + ] + } + } + }, + { + "type": "inline", + "named": true, + "fields": {} + }, + { + "type": "local_vars_declaration", + "named": true, + "fields": { + "lhs": { + "multiple": false, + "required": true, + "types": [ + { + "type": "tensor_vars_declaration", + "named": true + }, + { + "type": "tuple_vars_declaration", + "named": true + }, + { + "type": "var_declaration", + "named": true + } + ] + } + } + }, + { + "type": "method_call", + "named": true, + "fields": { + "arguments": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + }, + "method_name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, + { + "type": "method_id", + "named": true, + "fields": { + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "number_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + } + ] + } + } + }, + { + "type": "number_literal", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "number_string_literal", + "named": true + } + ] + } + }, + { + "type": "parameter_declaration", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": true, + "types": [ + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + } + } + }, + { + "type": "parameter_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "parameter_declaration", + "named": true + } + ] + } + }, + { + "type": "parameter_list_relaxed", + "named": true, + "fields": { + "name": { + "multiple": true, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "parameter_declaration", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + }, + { + "type": "pragma_directive", + "named": true, + "fields": { + "key": { + "multiple": false, + "required": true, + "types": [ + { + "type": "allow-post-modification", + "named": false + }, + { + "type": "compute-asm-ltr", + "named": false + }, + { + "type": "not-version", + "named": false + }, + { + "type": "version", + "named": false + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "version_identifier", + "named": true + } + ] + } + } + }, + { + "type": "primitive_type", + "named": true, + "fields": {} + }, + { + "type": "repeat_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + }, + "count": { + "multiple": true, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + } + } + }, + { + "type": "return_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + }, + { + "type": "source_file", + "named": true, + "root": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "constant_declarations", + "named": true + }, + { + "type": "empty_statement", + "named": true + }, + { + "type": "function_declaration", + "named": true + }, + { + "type": "global_var_declarations", + "named": true + }, + { + "type": "import_directive", + "named": true + }, + { + "type": "pragma_directive", + "named": true + } + ] + } + }, + { + "type": "specifiers_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "impure", + "named": true + }, + { + "type": "inline", + "named": true + }, + { + "type": "method_id", + "named": true + } + ] + } + }, + { + "type": "tensor_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + }, + { + "type": "tensor_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + } + }, + { + "type": "tensor_vars_declaration", + "named": true, + "fields": { + "vars": { + "multiple": true, + "required": true, + "types": [ + { + "type": ",", + "named": false + }, + { + "type": "tensor_vars_declaration", + "named": true + }, + { + "type": "tuple_vars_declaration", + "named": true + }, + { + "type": "var_declaration", + "named": true + } + ] + } + } + }, + { + "type": "try_catch_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "catch_clause", + "named": true + } + ] + } + }, + { + "type": "tuple_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + } + }, + { + "type": "tuple_vars_declaration", + "named": true, + "fields": { + "vars": { + "multiple": true, + "required": true, + "types": [ + { + "type": ",", + "named": false + }, + { + "type": "tensor_vars_declaration", + "named": true + }, + { + "type": "tuple_vars_declaration", + "named": true + }, + { + "type": "var_declaration", + "named": true + } + ] + } + } + }, + { + "type": "type_identifier", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "type_identifier", + "named": true + } + ] + } + }, + { + "type": "type_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_identifier", + "named": true + } + ] + } + } + }, + { + "type": "type_parameters", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_parameter", + "named": true + } + ] + } + }, + { + "type": "typed_tuple", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + } + ] + } + }, + { + "type": "var_declaration", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": true, + "required": true, + "types": [ + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "function_type", + "named": true + }, + { + "type": "hole_type", + "named": true + }, + { + "type": "primitive_type", + "named": true + }, + { + "type": "tensor_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_identifier", + "named": true + }, + { + "type": "var_type", + "named": true + } + ] + } + } + }, + { + "type": "while_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "block_statement", + "named": true + } + ] + }, + "precondition": { + "multiple": true, + "required": true, + "types": [ + { + "type": "!=", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "function_application", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "local_vars_declaration", + "named": true + }, + { + "type": "method_call", + "named": true + }, + { + "type": "number_literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "tensor_expression", + "named": true + }, + { + "type": "typed_tuple", + "named": true + }, + { + "type": "underscore", + "named": true + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } + ] + } + } + }, + { + "type": " ", + "named": false + }, + { + "type": "!=", + "named": false + }, + { + "type": "#include", + "named": false + }, + { + "type": "#pragma", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "-=", + "named": false + }, + { + "type": "->", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/%", + "named": false + }, + { + "type": "/=", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": ";", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<<", + "named": false + }, + { + "type": "<<=", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<=>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "==", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": ">>", + "named": false + }, + { + "type": ">>=", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "^", + "named": false + }, + { + "type": "^%", + "named": false + }, + { + "type": "^%=", + "named": false + }, + { + "type": "^/", + "named": false + }, + { + "type": "^/=", + "named": false + }, + { + "type": "^=", + "named": false + }, + { + "type": "^>>", + "named": false + }, + { + "type": "^>>=", + "named": false + }, + { + "type": "allow-post-modification", + "named": false + }, + { + "type": "asm", + "named": false + }, + { + "type": "builder", + "named": false + }, + { + "type": "catch", + "named": false + }, + { + "type": "cell", + "named": false + }, + { + "type": "comment", + "named": true, + "extra": true + }, + { + "type": "compute-asm-ltr", + "named": false + }, + { + "type": "const", + "named": false + }, + { + "type": "cont", + "named": false + }, + { + "type": "do", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "elseif", + "named": false + }, + { + "type": "elseifnot", + "named": false + }, + { + "type": "forall", + "named": false + }, + { + "type": "global", + "named": false + }, + { + "type": "identifier", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "ifnot", + "named": false + }, + { + "type": "impure", + "named": true + }, + { + "type": "inline", + "named": false + }, + { + "type": "inline_ref", + "named": false + }, + { + "type": "int", + "named": false + }, + { + "type": "method_id", + "named": false + }, + { + "type": "not-version", + "named": false + }, + { + "type": "number_string_literal", + "named": true + }, + { + "type": "repeat", + "named": false + }, + { + "type": "return", + "named": false + }, + { + "type": "slice", + "named": false + }, + { + "type": "slice_string_literal", + "named": true + }, + { + "type": "string_literal", + "named": true + }, + { + "type": "try", + "named": false + }, + { + "type": "tuple", + "named": false + }, + { + "type": "type", + "named": false + }, + { + "type": "underscore", + "named": true + }, + { + "type": "until", + "named": false + }, + { + "type": "var_type", + "named": true + }, + { + "type": "version", + "named": false + }, + { + "type": "version_identifier", + "named": true + }, + { + "type": "while", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "|=", + "named": false + }, + { + "type": "}", + "named": false + }, + { + "type": "~", + "named": false + }, + { + "type": "~%", + "named": false + }, + { + "type": "~%=", + "named": false + }, + { + "type": "~/", + "named": false + }, + { + "type": "~/=", + "named": false + }, + { + "type": "~>>", + "named": false + }, + { + "type": "~>>=", + "named": false + } +] diff --git a/server/src/languages/func/tree-sitter-func/src/parser.c b/server/src/languages/func/tree-sitter-func/src/parser.c new file mode 100644 index 00000000..f7421283 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/src/parser.c @@ -0,0 +1,19000 @@ +/* Automatically generated by tree-sitter v0.25.1 (f5afe475deb7c0bae6407fb776c76824f717bb61) */ + +#include "tree_sitter/parser.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 15 +#define STATE_COUNT 401 +#define LARGE_STATE_COUNT 38 +#define SYMBOL_COUNT 179 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 98 +#define EXTERNAL_TOKEN_COUNT 0 +#define FIELD_COUNT 25 +#define MAX_ALIAS_SEQUENCE_LENGTH 8 +#define MAX_RESERVED_WORD_SET_SIZE 0 +#define PRODUCTION_ID_COUNT 45 +#define SUPERTYPE_COUNT 0 + +enum ts_symbol_identifiers { + sym_identifier = 1, + anon_sym_POUNDinclude = 2, + anon_sym_SPACE = 3, + anon_sym_SEMI = 4, + sym_version_identifier = 5, + anon_sym_POUNDpragma = 6, + anon_sym_version = 7, + anon_sym_not_DASHversion = 8, + anon_sym_allow_DASHpost_DASHmodification = 9, + anon_sym_compute_DASHasm_DASHltr = 10, + anon_sym_global = 11, + anon_sym_COMMA = 12, + anon_sym_const = 13, + anon_sym_EQ = 14, + sym_impure = 15, + anon_sym_inline = 16, + anon_sym_inline_ref = 17, + anon_sym_method_id = 18, + anon_sym_LPAREN = 19, + anon_sym_RPAREN = 20, + anon_sym_forall = 21, + anon_sym_DASH_GT = 22, + anon_sym_type = 23, + anon_sym_asm = 24, + anon_sym_return = 25, + anon_sym_LBRACE = 26, + anon_sym_RBRACE = 27, + anon_sym_repeat = 28, + anon_sym_if = 29, + anon_sym_ifnot = 30, + anon_sym_else = 31, + anon_sym_elseif = 32, + anon_sym_elseifnot = 33, + anon_sym_do = 34, + anon_sym_until = 35, + anon_sym_while = 36, + anon_sym_try = 37, + anon_sym_catch = 38, + anon_sym_PLUS_EQ = 39, + anon_sym_DASH_EQ = 40, + anon_sym_STAR_EQ = 41, + anon_sym_SLASH_EQ = 42, + anon_sym_TILDE_SLASH_EQ = 43, + anon_sym_CARET_SLASH_EQ = 44, + anon_sym_PERCENT_EQ = 45, + anon_sym_TILDE_PERCENT_EQ = 46, + anon_sym_CARET_PERCENT_EQ = 47, + anon_sym_LT_LT_EQ = 48, + anon_sym_GT_GT_EQ = 49, + anon_sym_TILDE_GT_GT_EQ = 50, + anon_sym_CARET_GT_GT_EQ = 51, + anon_sym_AMP_EQ = 52, + anon_sym_PIPE_EQ = 53, + anon_sym_CARET_EQ = 54, + anon_sym_QMARK = 55, + anon_sym_COLON = 56, + anon_sym_EQ_EQ = 57, + anon_sym_LT = 58, + anon_sym_GT = 59, + anon_sym_LT_EQ = 60, + anon_sym_GT_EQ = 61, + anon_sym_BANG_EQ = 62, + anon_sym_LT_EQ_GT = 63, + anon_sym_LT_LT = 64, + anon_sym_GT_GT = 65, + anon_sym_TILDE_GT_GT = 66, + anon_sym_CARET_GT_GT = 67, + anon_sym_DASH = 68, + anon_sym_PLUS = 69, + anon_sym_PIPE = 70, + anon_sym_CARET = 71, + anon_sym_STAR = 72, + anon_sym_SLASH = 73, + anon_sym_PERCENT = 74, + anon_sym_TILDE_SLASH = 75, + anon_sym_CARET_SLASH = 76, + anon_sym_TILDE_PERCENT = 77, + anon_sym_CARET_PERCENT = 78, + anon_sym_SLASH_PERCENT = 79, + anon_sym_AMP = 80, + anon_sym_TILDE = 81, + anon_sym_DOT = 82, + anon_sym_LBRACK = 83, + anon_sym_RBRACK = 84, + anon_sym_int = 85, + anon_sym_cell = 86, + anon_sym_slice = 87, + anon_sym_builder = 88, + anon_sym_cont = 89, + anon_sym_tuple = 90, + sym_var_type = 91, + aux_sym_number_literal_token1 = 92, + sym_string_literal = 93, + sym_number_string_literal = 94, + sym_slice_string_literal = 95, + sym_underscore = 96, + sym_comment = 97, + sym_source_file = 98, + sym__top_level_item = 99, + sym_import_directive = 100, + sym_pragma_directive = 101, + sym_global_var_declarations = 102, + sym_global_var_declaration = 103, + sym_constant_declarations = 104, + sym_constant_declaration = 105, + sym_function_declaration = 106, + sym_inline = 107, + sym_method_id = 108, + sym_specifiers_list = 109, + sym_type_parameters = 110, + sym_type_parameter = 111, + sym_parameter_list = 112, + sym_parameter_list_relaxed = 113, + sym_parameter_declaration = 114, + sym_asm_function_body = 115, + sym__statement = 116, + sym_return_statement = 117, + sym_block_statement = 118, + sym_expression_statement = 119, + sym_empty_statement = 120, + sym_repeat_statement = 121, + sym_if_statement = 122, + sym__if_statement_contents = 123, + sym_do_while_statement = 124, + sym_while_statement = 125, + sym_try_catch_statement = 126, + sym_catch_clause = 127, + sym__expression = 128, + sym__expr10 = 129, + sym__expr13 = 130, + sym__expr15 = 131, + sym__expr17 = 132, + sym__expr20 = 133, + sym__expr30 = 134, + sym__expr75 = 135, + sym__expr80 = 136, + sym_method_call = 137, + sym__expr90 = 138, + sym_function_application = 139, + sym_local_vars_declaration = 140, + sym_tuple_vars_declaration = 141, + sym_tensor_vars_declaration = 142, + sym_var_declaration = 143, + sym__var_declaration_lhs = 144, + sym__nontype_expr100 = 145, + sym__expr100 = 146, + sym_parenthesized_expression = 147, + sym_tensor_expression = 148, + sym_typed_tuple = 149, + sym__type_hint = 150, + sym_function_type = 151, + sym__atomic_type = 152, + sym__parenthesized_type = 153, + sym_primitive_type = 154, + sym_tensor_type = 155, + sym_tuple_type = 156, + sym_hole_type = 157, + sym_type_identifier = 158, + sym_number_literal = 159, + aux_sym_source_file_repeat1 = 160, + aux_sym_import_directive_repeat1 = 161, + aux_sym_global_var_declarations_repeat1 = 162, + aux_sym_constant_declarations_repeat1 = 163, + aux_sym_type_parameters_repeat1 = 164, + aux_sym_parameter_list_repeat1 = 165, + aux_sym_parameter_list_relaxed_repeat1 = 166, + aux_sym_asm_function_body_repeat1 = 167, + aux_sym_asm_function_body_repeat2 = 168, + aux_sym_asm_function_body_repeat3 = 169, + aux_sym_block_statement_repeat1 = 170, + aux_sym__expr17_repeat1 = 171, + aux_sym__expr20_repeat1 = 172, + aux_sym__expr30_repeat1 = 173, + aux_sym__expr80_repeat1 = 174, + aux_sym_function_application_repeat1 = 175, + aux_sym_tuple_vars_declaration_repeat1 = 176, + aux_sym_tensor_expression_repeat1 = 177, + aux_sym_tensor_type_repeat1 = 178, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [sym_identifier] = "identifier", + [anon_sym_POUNDinclude] = "#include", + [anon_sym_SPACE] = " ", + [anon_sym_SEMI] = ";", + [sym_version_identifier] = "version_identifier", + [anon_sym_POUNDpragma] = "#pragma", + [anon_sym_version] = "version", + [anon_sym_not_DASHversion] = "not-version", + [anon_sym_allow_DASHpost_DASHmodification] = "allow-post-modification", + [anon_sym_compute_DASHasm_DASHltr] = "compute-asm-ltr", + [anon_sym_global] = "global", + [anon_sym_COMMA] = ",", + [anon_sym_const] = "const", + [anon_sym_EQ] = "=", + [sym_impure] = "impure", + [anon_sym_inline] = "inline", + [anon_sym_inline_ref] = "inline_ref", + [anon_sym_method_id] = "method_id", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_forall] = "forall", + [anon_sym_DASH_GT] = "->", + [anon_sym_type] = "type", + [anon_sym_asm] = "asm", + [anon_sym_return] = "return", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_repeat] = "repeat", + [anon_sym_if] = "if", + [anon_sym_ifnot] = "ifnot", + [anon_sym_else] = "else", + [anon_sym_elseif] = "elseif", + [anon_sym_elseifnot] = "elseifnot", + [anon_sym_do] = "do", + [anon_sym_until] = "until", + [anon_sym_while] = "while", + [anon_sym_try] = "try", + [anon_sym_catch] = "catch", + [anon_sym_PLUS_EQ] = "+=", + [anon_sym_DASH_EQ] = "-=", + [anon_sym_STAR_EQ] = "*=", + [anon_sym_SLASH_EQ] = "/=", + [anon_sym_TILDE_SLASH_EQ] = "~/=", + [anon_sym_CARET_SLASH_EQ] = "^/=", + [anon_sym_PERCENT_EQ] = "%=", + [anon_sym_TILDE_PERCENT_EQ] = "~%=", + [anon_sym_CARET_PERCENT_EQ] = "^%=", + [anon_sym_LT_LT_EQ] = "<<=", + [anon_sym_GT_GT_EQ] = ">>=", + [anon_sym_TILDE_GT_GT_EQ] = "~>>=", + [anon_sym_CARET_GT_GT_EQ] = "^>>=", + [anon_sym_AMP_EQ] = "&=", + [anon_sym_PIPE_EQ] = "|=", + [anon_sym_CARET_EQ] = "^=", + [anon_sym_QMARK] = "\?", + [anon_sym_COLON] = ":", + [anon_sym_EQ_EQ] = "==", + [anon_sym_LT] = "<", + [anon_sym_GT] = ">", + [anon_sym_LT_EQ] = "<=", + [anon_sym_GT_EQ] = ">=", + [anon_sym_BANG_EQ] = "!=", + [anon_sym_LT_EQ_GT] = "<=>", + [anon_sym_LT_LT] = "<<", + [anon_sym_GT_GT] = ">>", + [anon_sym_TILDE_GT_GT] = "~>>", + [anon_sym_CARET_GT_GT] = "^>>", + [anon_sym_DASH] = "-", + [anon_sym_PLUS] = "+", + [anon_sym_PIPE] = "|", + [anon_sym_CARET] = "^", + [anon_sym_STAR] = "*", + [anon_sym_SLASH] = "/", + [anon_sym_PERCENT] = "%", + [anon_sym_TILDE_SLASH] = "~/", + [anon_sym_CARET_SLASH] = "^/", + [anon_sym_TILDE_PERCENT] = "~%", + [anon_sym_CARET_PERCENT] = "^%", + [anon_sym_SLASH_PERCENT] = "/%", + [anon_sym_AMP] = "&", + [anon_sym_TILDE] = "~", + [anon_sym_DOT] = ".", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_int] = "int", + [anon_sym_cell] = "cell", + [anon_sym_slice] = "slice", + [anon_sym_builder] = "builder", + [anon_sym_cont] = "cont", + [anon_sym_tuple] = "tuple", + [sym_var_type] = "var_type", + [aux_sym_number_literal_token1] = "number_literal_token1", + [sym_string_literal] = "string_literal", + [sym_number_string_literal] = "number_string_literal", + [sym_slice_string_literal] = "slice_string_literal", + [sym_underscore] = "underscore", + [sym_comment] = "comment", + [sym_source_file] = "source_file", + [sym__top_level_item] = "_top_level_item", + [sym_import_directive] = "import_directive", + [sym_pragma_directive] = "pragma_directive", + [sym_global_var_declarations] = "global_var_declarations", + [sym_global_var_declaration] = "global_var_declaration", + [sym_constant_declarations] = "constant_declarations", + [sym_constant_declaration] = "constant_declaration", + [sym_function_declaration] = "function_declaration", + [sym_inline] = "inline", + [sym_method_id] = "method_id", + [sym_specifiers_list] = "specifiers_list", + [sym_type_parameters] = "type_parameters", + [sym_type_parameter] = "type_parameter", + [sym_parameter_list] = "parameter_list", + [sym_parameter_list_relaxed] = "parameter_list_relaxed", + [sym_parameter_declaration] = "parameter_declaration", + [sym_asm_function_body] = "asm_function_body", + [sym__statement] = "_statement", + [sym_return_statement] = "return_statement", + [sym_block_statement] = "block_statement", + [sym_expression_statement] = "expression_statement", + [sym_empty_statement] = "empty_statement", + [sym_repeat_statement] = "repeat_statement", + [sym_if_statement] = "if_statement", + [sym__if_statement_contents] = "_if_statement_contents", + [sym_do_while_statement] = "do_while_statement", + [sym_while_statement] = "while_statement", + [sym_try_catch_statement] = "try_catch_statement", + [sym_catch_clause] = "catch_clause", + [sym__expression] = "_expression", + [sym__expr10] = "_expr10", + [sym__expr13] = "_expr13", + [sym__expr15] = "_expr15", + [sym__expr17] = "_expr17", + [sym__expr20] = "_expr20", + [sym__expr30] = "_expr30", + [sym__expr75] = "_expr75", + [sym__expr80] = "_expr80", + [sym_method_call] = "method_call", + [sym__expr90] = "_expr90", + [sym_function_application] = "function_application", + [sym_local_vars_declaration] = "local_vars_declaration", + [sym_tuple_vars_declaration] = "tuple_vars_declaration", + [sym_tensor_vars_declaration] = "tensor_vars_declaration", + [sym_var_declaration] = "var_declaration", + [sym__var_declaration_lhs] = "_var_declaration_lhs", + [sym__nontype_expr100] = "_nontype_expr100", + [sym__expr100] = "_expr100", + [sym_parenthesized_expression] = "parenthesized_expression", + [sym_tensor_expression] = "tensor_expression", + [sym_typed_tuple] = "typed_tuple", + [sym__type_hint] = "_type_hint", + [sym_function_type] = "function_type", + [sym__atomic_type] = "_atomic_type", + [sym__parenthesized_type] = "_parenthesized_type", + [sym_primitive_type] = "primitive_type", + [sym_tensor_type] = "tensor_type", + [sym_tuple_type] = "tuple_type", + [sym_hole_type] = "hole_type", + [sym_type_identifier] = "type_identifier", + [sym_number_literal] = "number_literal", + [aux_sym_source_file_repeat1] = "source_file_repeat1", + [aux_sym_import_directive_repeat1] = "import_directive_repeat1", + [aux_sym_global_var_declarations_repeat1] = "global_var_declarations_repeat1", + [aux_sym_constant_declarations_repeat1] = "constant_declarations_repeat1", + [aux_sym_type_parameters_repeat1] = "type_parameters_repeat1", + [aux_sym_parameter_list_repeat1] = "parameter_list_repeat1", + [aux_sym_parameter_list_relaxed_repeat1] = "parameter_list_relaxed_repeat1", + [aux_sym_asm_function_body_repeat1] = "asm_function_body_repeat1", + [aux_sym_asm_function_body_repeat2] = "asm_function_body_repeat2", + [aux_sym_asm_function_body_repeat3] = "asm_function_body_repeat3", + [aux_sym_block_statement_repeat1] = "block_statement_repeat1", + [aux_sym__expr17_repeat1] = "_expr17_repeat1", + [aux_sym__expr20_repeat1] = "_expr20_repeat1", + [aux_sym__expr30_repeat1] = "_expr30_repeat1", + [aux_sym__expr80_repeat1] = "_expr80_repeat1", + [aux_sym_function_application_repeat1] = "function_application_repeat1", + [aux_sym_tuple_vars_declaration_repeat1] = "tuple_vars_declaration_repeat1", + [aux_sym_tensor_expression_repeat1] = "tensor_expression_repeat1", + [aux_sym_tensor_type_repeat1] = "tensor_type_repeat1", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [sym_identifier] = sym_identifier, + [anon_sym_POUNDinclude] = anon_sym_POUNDinclude, + [anon_sym_SPACE] = anon_sym_SPACE, + [anon_sym_SEMI] = anon_sym_SEMI, + [sym_version_identifier] = sym_version_identifier, + [anon_sym_POUNDpragma] = anon_sym_POUNDpragma, + [anon_sym_version] = anon_sym_version, + [anon_sym_not_DASHversion] = anon_sym_not_DASHversion, + [anon_sym_allow_DASHpost_DASHmodification] = anon_sym_allow_DASHpost_DASHmodification, + [anon_sym_compute_DASHasm_DASHltr] = anon_sym_compute_DASHasm_DASHltr, + [anon_sym_global] = anon_sym_global, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_const] = anon_sym_const, + [anon_sym_EQ] = anon_sym_EQ, + [sym_impure] = sym_impure, + [anon_sym_inline] = anon_sym_inline, + [anon_sym_inline_ref] = anon_sym_inline_ref, + [anon_sym_method_id] = anon_sym_method_id, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_forall] = anon_sym_forall, + [anon_sym_DASH_GT] = anon_sym_DASH_GT, + [anon_sym_type] = anon_sym_type, + [anon_sym_asm] = anon_sym_asm, + [anon_sym_return] = anon_sym_return, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_repeat] = anon_sym_repeat, + [anon_sym_if] = anon_sym_if, + [anon_sym_ifnot] = anon_sym_ifnot, + [anon_sym_else] = anon_sym_else, + [anon_sym_elseif] = anon_sym_elseif, + [anon_sym_elseifnot] = anon_sym_elseifnot, + [anon_sym_do] = anon_sym_do, + [anon_sym_until] = anon_sym_until, + [anon_sym_while] = anon_sym_while, + [anon_sym_try] = anon_sym_try, + [anon_sym_catch] = anon_sym_catch, + [anon_sym_PLUS_EQ] = anon_sym_PLUS_EQ, + [anon_sym_DASH_EQ] = anon_sym_DASH_EQ, + [anon_sym_STAR_EQ] = anon_sym_STAR_EQ, + [anon_sym_SLASH_EQ] = anon_sym_SLASH_EQ, + [anon_sym_TILDE_SLASH_EQ] = anon_sym_TILDE_SLASH_EQ, + [anon_sym_CARET_SLASH_EQ] = anon_sym_CARET_SLASH_EQ, + [anon_sym_PERCENT_EQ] = anon_sym_PERCENT_EQ, + [anon_sym_TILDE_PERCENT_EQ] = anon_sym_TILDE_PERCENT_EQ, + [anon_sym_CARET_PERCENT_EQ] = anon_sym_CARET_PERCENT_EQ, + [anon_sym_LT_LT_EQ] = anon_sym_LT_LT_EQ, + [anon_sym_GT_GT_EQ] = anon_sym_GT_GT_EQ, + [anon_sym_TILDE_GT_GT_EQ] = anon_sym_TILDE_GT_GT_EQ, + [anon_sym_CARET_GT_GT_EQ] = anon_sym_CARET_GT_GT_EQ, + [anon_sym_AMP_EQ] = anon_sym_AMP_EQ, + [anon_sym_PIPE_EQ] = anon_sym_PIPE_EQ, + [anon_sym_CARET_EQ] = anon_sym_CARET_EQ, + [anon_sym_QMARK] = anon_sym_QMARK, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, + [anon_sym_LT_EQ_GT] = anon_sym_LT_EQ_GT, + [anon_sym_LT_LT] = anon_sym_LT_LT, + [anon_sym_GT_GT] = anon_sym_GT_GT, + [anon_sym_TILDE_GT_GT] = anon_sym_TILDE_GT_GT, + [anon_sym_CARET_GT_GT] = anon_sym_CARET_GT_GT, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_CARET] = anon_sym_CARET, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_PERCENT] = anon_sym_PERCENT, + [anon_sym_TILDE_SLASH] = anon_sym_TILDE_SLASH, + [anon_sym_CARET_SLASH] = anon_sym_CARET_SLASH, + [anon_sym_TILDE_PERCENT] = anon_sym_TILDE_PERCENT, + [anon_sym_CARET_PERCENT] = anon_sym_CARET_PERCENT, + [anon_sym_SLASH_PERCENT] = anon_sym_SLASH_PERCENT, + [anon_sym_AMP] = anon_sym_AMP, + [anon_sym_TILDE] = anon_sym_TILDE, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_int] = anon_sym_int, + [anon_sym_cell] = anon_sym_cell, + [anon_sym_slice] = anon_sym_slice, + [anon_sym_builder] = anon_sym_builder, + [anon_sym_cont] = anon_sym_cont, + [anon_sym_tuple] = anon_sym_tuple, + [sym_var_type] = sym_var_type, + [aux_sym_number_literal_token1] = aux_sym_number_literal_token1, + [sym_string_literal] = sym_string_literal, + [sym_number_string_literal] = sym_number_string_literal, + [sym_slice_string_literal] = sym_slice_string_literal, + [sym_underscore] = sym_underscore, + [sym_comment] = sym_comment, + [sym_source_file] = sym_source_file, + [sym__top_level_item] = sym__top_level_item, + [sym_import_directive] = sym_import_directive, + [sym_pragma_directive] = sym_pragma_directive, + [sym_global_var_declarations] = sym_global_var_declarations, + [sym_global_var_declaration] = sym_global_var_declaration, + [sym_constant_declarations] = sym_constant_declarations, + [sym_constant_declaration] = sym_constant_declaration, + [sym_function_declaration] = sym_function_declaration, + [sym_inline] = sym_inline, + [sym_method_id] = sym_method_id, + [sym_specifiers_list] = sym_specifiers_list, + [sym_type_parameters] = sym_type_parameters, + [sym_type_parameter] = sym_type_parameter, + [sym_parameter_list] = sym_parameter_list, + [sym_parameter_list_relaxed] = sym_parameter_list_relaxed, + [sym_parameter_declaration] = sym_parameter_declaration, + [sym_asm_function_body] = sym_asm_function_body, + [sym__statement] = sym__statement, + [sym_return_statement] = sym_return_statement, + [sym_block_statement] = sym_block_statement, + [sym_expression_statement] = sym_expression_statement, + [sym_empty_statement] = sym_empty_statement, + [sym_repeat_statement] = sym_repeat_statement, + [sym_if_statement] = sym_if_statement, + [sym__if_statement_contents] = sym__if_statement_contents, + [sym_do_while_statement] = sym_do_while_statement, + [sym_while_statement] = sym_while_statement, + [sym_try_catch_statement] = sym_try_catch_statement, + [sym_catch_clause] = sym_catch_clause, + [sym__expression] = sym__expression, + [sym__expr10] = sym__expr10, + [sym__expr13] = sym__expr13, + [sym__expr15] = sym__expr15, + [sym__expr17] = sym__expr17, + [sym__expr20] = sym__expr20, + [sym__expr30] = sym__expr30, + [sym__expr75] = sym__expr75, + [sym__expr80] = sym__expr80, + [sym_method_call] = sym_method_call, + [sym__expr90] = sym__expr90, + [sym_function_application] = sym_function_application, + [sym_local_vars_declaration] = sym_local_vars_declaration, + [sym_tuple_vars_declaration] = sym_tuple_vars_declaration, + [sym_tensor_vars_declaration] = sym_tensor_vars_declaration, + [sym_var_declaration] = sym_var_declaration, + [sym__var_declaration_lhs] = sym__var_declaration_lhs, + [sym__nontype_expr100] = sym__nontype_expr100, + [sym__expr100] = sym__expr100, + [sym_parenthesized_expression] = sym_parenthesized_expression, + [sym_tensor_expression] = sym_tensor_expression, + [sym_typed_tuple] = sym_typed_tuple, + [sym__type_hint] = sym__type_hint, + [sym_function_type] = sym_function_type, + [sym__atomic_type] = sym__atomic_type, + [sym__parenthesized_type] = sym__parenthesized_type, + [sym_primitive_type] = sym_primitive_type, + [sym_tensor_type] = sym_tensor_type, + [sym_tuple_type] = sym_tuple_type, + [sym_hole_type] = sym_hole_type, + [sym_type_identifier] = sym_type_identifier, + [sym_number_literal] = sym_number_literal, + [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, + [aux_sym_import_directive_repeat1] = aux_sym_import_directive_repeat1, + [aux_sym_global_var_declarations_repeat1] = aux_sym_global_var_declarations_repeat1, + [aux_sym_constant_declarations_repeat1] = aux_sym_constant_declarations_repeat1, + [aux_sym_type_parameters_repeat1] = aux_sym_type_parameters_repeat1, + [aux_sym_parameter_list_repeat1] = aux_sym_parameter_list_repeat1, + [aux_sym_parameter_list_relaxed_repeat1] = aux_sym_parameter_list_relaxed_repeat1, + [aux_sym_asm_function_body_repeat1] = aux_sym_asm_function_body_repeat1, + [aux_sym_asm_function_body_repeat2] = aux_sym_asm_function_body_repeat2, + [aux_sym_asm_function_body_repeat3] = aux_sym_asm_function_body_repeat3, + [aux_sym_block_statement_repeat1] = aux_sym_block_statement_repeat1, + [aux_sym__expr17_repeat1] = aux_sym__expr17_repeat1, + [aux_sym__expr20_repeat1] = aux_sym__expr20_repeat1, + [aux_sym__expr30_repeat1] = aux_sym__expr30_repeat1, + [aux_sym__expr80_repeat1] = aux_sym__expr80_repeat1, + [aux_sym_function_application_repeat1] = aux_sym_function_application_repeat1, + [aux_sym_tuple_vars_declaration_repeat1] = aux_sym_tuple_vars_declaration_repeat1, + [aux_sym_tensor_expression_repeat1] = aux_sym_tensor_expression_repeat1, + [aux_sym_tensor_type_repeat1] = aux_sym_tensor_type_repeat1, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [anon_sym_POUNDinclude] = { + .visible = true, + .named = false, + }, + [anon_sym_SPACE] = { + .visible = true, + .named = false, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [sym_version_identifier] = { + .visible = true, + .named = true, + }, + [anon_sym_POUNDpragma] = { + .visible = true, + .named = false, + }, + [anon_sym_version] = { + .visible = true, + .named = false, + }, + [anon_sym_not_DASHversion] = { + .visible = true, + .named = false, + }, + [anon_sym_allow_DASHpost_DASHmodification] = { + .visible = true, + .named = false, + }, + [anon_sym_compute_DASHasm_DASHltr] = { + .visible = true, + .named = false, + }, + [anon_sym_global] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_const] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [sym_impure] = { + .visible = true, + .named = true, + }, + [anon_sym_inline] = { + .visible = true, + .named = false, + }, + [anon_sym_inline_ref] = { + .visible = true, + .named = false, + }, + [anon_sym_method_id] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_forall] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_type] = { + .visible = true, + .named = false, + }, + [anon_sym_asm] = { + .visible = true, + .named = false, + }, + [anon_sym_return] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_repeat] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_ifnot] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_elseif] = { + .visible = true, + .named = false, + }, + [anon_sym_elseifnot] = { + .visible = true, + .named = false, + }, + [anon_sym_do] = { + .visible = true, + .named = false, + }, + [anon_sym_until] = { + .visible = true, + .named = false, + }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_try] = { + .visible = true, + .named = false, + }, + [anon_sym_catch] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_SLASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_SLASH_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_PERCENT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_PERCENT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_GT_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_GT_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_QMARK] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_int] = { + .visible = true, + .named = false, + }, + [anon_sym_cell] = { + .visible = true, + .named = false, + }, + [anon_sym_slice] = { + .visible = true, + .named = false, + }, + [anon_sym_builder] = { + .visible = true, + .named = false, + }, + [anon_sym_cont] = { + .visible = true, + .named = false, + }, + [anon_sym_tuple] = { + .visible = true, + .named = false, + }, + [sym_var_type] = { + .visible = true, + .named = true, + }, + [aux_sym_number_literal_token1] = { + .visible = false, + .named = false, + }, + [sym_string_literal] = { + .visible = true, + .named = true, + }, + [sym_number_string_literal] = { + .visible = true, + .named = true, + }, + [sym_slice_string_literal] = { + .visible = true, + .named = true, + }, + [sym_underscore] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [sym_source_file] = { + .visible = true, + .named = true, + }, + [sym__top_level_item] = { + .visible = false, + .named = true, + }, + [sym_import_directive] = { + .visible = true, + .named = true, + }, + [sym_pragma_directive] = { + .visible = true, + .named = true, + }, + [sym_global_var_declarations] = { + .visible = true, + .named = true, + }, + [sym_global_var_declaration] = { + .visible = true, + .named = true, + }, + [sym_constant_declarations] = { + .visible = true, + .named = true, + }, + [sym_constant_declaration] = { + .visible = true, + .named = true, + }, + [sym_function_declaration] = { + .visible = true, + .named = true, + }, + [sym_inline] = { + .visible = true, + .named = true, + }, + [sym_method_id] = { + .visible = true, + .named = true, + }, + [sym_specifiers_list] = { + .visible = true, + .named = true, + }, + [sym_type_parameters] = { + .visible = true, + .named = true, + }, + [sym_type_parameter] = { + .visible = true, + .named = true, + }, + [sym_parameter_list] = { + .visible = true, + .named = true, + }, + [sym_parameter_list_relaxed] = { + .visible = true, + .named = true, + }, + [sym_parameter_declaration] = { + .visible = true, + .named = true, + }, + [sym_asm_function_body] = { + .visible = true, + .named = true, + }, + [sym__statement] = { + .visible = false, + .named = true, + }, + [sym_return_statement] = { + .visible = true, + .named = true, + }, + [sym_block_statement] = { + .visible = true, + .named = true, + }, + [sym_expression_statement] = { + .visible = true, + .named = true, + }, + [sym_empty_statement] = { + .visible = true, + .named = true, + }, + [sym_repeat_statement] = { + .visible = true, + .named = true, + }, + [sym_if_statement] = { + .visible = true, + .named = true, + }, + [sym__if_statement_contents] = { + .visible = false, + .named = true, + }, + [sym_do_while_statement] = { + .visible = true, + .named = true, + }, + [sym_while_statement] = { + .visible = true, + .named = true, + }, + [sym_try_catch_statement] = { + .visible = true, + .named = true, + }, + [sym_catch_clause] = { + .visible = true, + .named = true, + }, + [sym__expression] = { + .visible = false, + .named = true, + }, + [sym__expr10] = { + .visible = false, + .named = true, + }, + [sym__expr13] = { + .visible = false, + .named = true, + }, + [sym__expr15] = { + .visible = false, + .named = true, + }, + [sym__expr17] = { + .visible = false, + .named = true, + }, + [sym__expr20] = { + .visible = false, + .named = true, + }, + [sym__expr30] = { + .visible = false, + .named = true, + }, + [sym__expr75] = { + .visible = false, + .named = true, + }, + [sym__expr80] = { + .visible = false, + .named = true, + }, + [sym_method_call] = { + .visible = true, + .named = true, + }, + [sym__expr90] = { + .visible = false, + .named = true, + }, + [sym_function_application] = { + .visible = true, + .named = true, + }, + [sym_local_vars_declaration] = { + .visible = true, + .named = true, + }, + [sym_tuple_vars_declaration] = { + .visible = true, + .named = true, + }, + [sym_tensor_vars_declaration] = { + .visible = true, + .named = true, + }, + [sym_var_declaration] = { + .visible = true, + .named = true, + }, + [sym__var_declaration_lhs] = { + .visible = false, + .named = true, + }, + [sym__nontype_expr100] = { + .visible = false, + .named = true, + }, + [sym__expr100] = { + .visible = false, + .named = true, + }, + [sym_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym_tensor_expression] = { + .visible = true, + .named = true, + }, + [sym_typed_tuple] = { + .visible = true, + .named = true, + }, + [sym__type_hint] = { + .visible = false, + .named = true, + }, + [sym_function_type] = { + .visible = true, + .named = true, + }, + [sym__atomic_type] = { + .visible = false, + .named = true, + }, + [sym__parenthesized_type] = { + .visible = false, + .named = true, + }, + [sym_primitive_type] = { + .visible = true, + .named = true, + }, + [sym_tensor_type] = { + .visible = true, + .named = true, + }, + [sym_tuple_type] = { + .visible = true, + .named = true, + }, + [sym_hole_type] = { + .visible = true, + .named = true, + }, + [sym_type_identifier] = { + .visible = true, + .named = true, + }, + [sym_number_literal] = { + .visible = true, + .named = true, + }, + [aux_sym_source_file_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_import_directive_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_global_var_declarations_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_constant_declarations_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_type_parameters_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_parameter_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_parameter_list_relaxed_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_asm_function_body_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_asm_function_body_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym_asm_function_body_repeat3] = { + .visible = false, + .named = false, + }, + [aux_sym_block_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__expr17_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__expr20_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__expr30_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__expr80_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_function_application_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_tuple_vars_declaration_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_tensor_expression_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_tensor_type_repeat1] = { + .visible = false, + .named = false, + }, +}; + +enum ts_field_identifiers { + field_alternative = 1, + field_arguments = 2, + field_asm_body = 3, + field_body = 4, + field_callee = 5, + field_catch_body = 6, + field_catch_expr = 7, + field_condition = 8, + field_consequent = 9, + field_count = 10, + field_decls = 11, + field_key = 12, + field_lhs = 13, + field_method_name = 14, + field_name = 15, + field_parameters = 16, + field_path = 17, + field_postcondition = 18, + field_precondition = 19, + field_return_type = 20, + field_specifiers = 21, + field_type = 22, + field_type_parameters = 23, + field_value = 24, + field_vars = 25, +}; + +static const char * const ts_field_names[] = { + [0] = NULL, + [field_alternative] = "alternative", + [field_arguments] = "arguments", + [field_asm_body] = "asm_body", + [field_body] = "body", + [field_callee] = "callee", + [field_catch_body] = "catch_body", + [field_catch_expr] = "catch_expr", + [field_condition] = "condition", + [field_consequent] = "consequent", + [field_count] = "count", + [field_decls] = "decls", + [field_key] = "key", + [field_lhs] = "lhs", + [field_method_name] = "method_name", + [field_name] = "name", + [field_parameters] = "parameters", + [field_path] = "path", + [field_postcondition] = "postcondition", + [field_precondition] = "precondition", + [field_return_type] = "return_type", + [field_specifiers] = "specifiers", + [field_type] = "type", + [field_type_parameters] = "type_parameters", + [field_value] = "value", + [field_vars] = "vars", +}; + +static const TSMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { + [3] = {.index = 0, .length = 1}, + [4] = {.index = 1, .length = 1}, + [5] = {.index = 2, .length = 1}, + [6] = {.index = 3, .length = 1}, + [7] = {.index = 4, .length = 2}, + [8] = {.index = 6, .length = 1}, + [9] = {.index = 7, .length = 2}, + [10] = {.index = 9, .length = 2}, + [11] = {.index = 11, .length = 1}, + [12] = {.index = 12, .length = 1}, + [13] = {.index = 13, .length = 4}, + [14] = {.index = 17, .length = 4}, + [15] = {.index = 21, .length = 3}, + [16] = {.index = 24, .length = 2}, + [17] = {.index = 26, .length = 2}, + [18] = {.index = 28, .length = 3}, + [19] = {.index = 31, .length = 5}, + [20] = {.index = 36, .length = 5}, + [21] = {.index = 41, .length = 4}, + [22] = {.index = 45, .length = 5}, + [23] = {.index = 50, .length = 5}, + [24] = {.index = 55, .length = 4}, + [25] = {.index = 59, .length = 1}, + [26] = {.index = 60, .length = 6}, + [27] = {.index = 66, .length = 6}, + [28] = {.index = 72, .length = 5}, + [29] = {.index = 77, .length = 2}, + [30] = {.index = 79, .length = 2}, + [31] = {.index = 81, .length = 1}, + [32] = {.index = 82, .length = 3}, + [33] = {.index = 85, .length = 2}, + [34] = {.index = 87, .length = 2}, + [35] = {.index = 89, .length = 1}, + [36] = {.index = 90, .length = 2}, + [37] = {.index = 92, .length = 2}, + [38] = {.index = 94, .length = 2}, + [39] = {.index = 96, .length = 1}, + [40] = {.index = 97, .length = 2}, + [41] = {.index = 99, .length = 1}, + [42] = {.index = 100, .length = 4}, + [43] = {.index = 104, .length = 7}, + [44] = {.index = 111, .length = 2}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_name, 0}, + [1] = + {field_path, 2}, + [2] = + {field_key, 2}, + [3] = + {field_decls, 1}, + [4] = + {field_name, 1}, + {field_type, 0}, + [6] = + {field_name, 1}, + [7] = + {field_decls, 1}, + {field_decls, 2}, + [9] = + {field_name, 0}, + {field_value, 2}, + [11] = + {field_lhs, 0}, + [12] = + {field_type, 0}, + [13] = + {field_asm_body, 3}, + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 0}, + [17] = + {field_body, 3}, + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 0}, + [21] = + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 0}, + [24] = + {field_key, 2}, + {field_value, 4}, + [26] = + {field_arguments, 1}, + {field_callee, 0}, + [28] = + {field_name, 1}, + {field_type, 0}, + {field_value, 3}, + [31] = + {field_asm_body, 4}, + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 1}, + {field_type_parameters, 0}, + [36] = + {field_body, 4}, + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 1}, + {field_type_parameters, 0}, + [41] = + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 1}, + {field_type_parameters, 0}, + [45] = + {field_asm_body, 4}, + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 0}, + {field_specifiers, 3}, + [50] = + {field_body, 4}, + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 0}, + {field_specifiers, 3}, + [55] = + {field_name, 1}, + {field_parameters, 2}, + {field_return_type, 0}, + {field_specifiers, 3}, + [59] = + {field_vars, 1}, + [60] = + {field_asm_body, 5}, + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 1}, + {field_specifiers, 4}, + {field_type_parameters, 0}, + [66] = + {field_body, 5}, + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 1}, + {field_specifiers, 4}, + {field_type_parameters, 0}, + [72] = + {field_name, 2}, + {field_parameters, 3}, + {field_return_type, 1}, + {field_specifiers, 4}, + {field_type_parameters, 0}, + [77] = + {field_name, 1}, + {field_name, 2, .inherited = true}, + [79] = + {field_name, 0, .inherited = true}, + {field_name, 1, .inherited = true}, + [81] = + {field_name, 2, .inherited = true}, + [82] = + {field_alternative, 1, .inherited = true}, + {field_condition, 1, .inherited = true}, + {field_consequent, 1, .inherited = true}, + [85] = + {field_vars, 1}, + {field_vars, 2}, + [87] = + {field_arguments, 2}, + {field_method_name, 1}, + [89] = + {field_value, 2}, + [90] = + {field_body, 2}, + {field_count, 1}, + [92] = + {field_condition, 0}, + {field_consequent, 1}, + [94] = + {field_body, 2}, + {field_precondition, 1}, + [96] = + {field_body, 1}, + [97] = + {field_body, 1}, + {field_postcondition, 3}, + [99] = + {field_catch_body, 1}, + [100] = + {field_alternative, 2}, + {field_alternative, 3}, + {field_condition, 0}, + {field_consequent, 1}, + [104] = + {field_alternative, 2}, + {field_alternative, 3}, + {field_alternative, 3, .inherited = true}, + {field_condition, 0}, + {field_condition, 3, .inherited = true}, + {field_consequent, 1}, + {field_consequent, 3, .inherited = true}, + [111] = + {field_catch_body, 2}, + {field_catch_expr, 1}, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, + [1] = { + [0] = sym_type_identifier, + }, + [2] = { + [0] = sym_hole_type, + }, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 4, + [5] = 5, + [6] = 6, + [7] = 7, + [8] = 8, + [9] = 9, + [10] = 10, + [11] = 11, + [12] = 12, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 17, + [18] = 18, + [19] = 19, + [20] = 20, + [21] = 21, + [22] = 22, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 26, + [27] = 27, + [28] = 28, + [29] = 29, + [30] = 30, + [31] = 31, + [32] = 32, + [33] = 33, + [34] = 11, + [35] = 12, + [36] = 36, + [37] = 37, + [38] = 38, + [39] = 39, + [40] = 40, + [41] = 41, + [42] = 42, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 46, + [47] = 47, + [48] = 2, + [49] = 3, + [50] = 50, + [51] = 8, + [52] = 7, + [53] = 10, + [54] = 9, + [55] = 21, + [56] = 5, + [57] = 24, + [58] = 20, + [59] = 14, + [60] = 22, + [61] = 4, + [62] = 25, + [63] = 26, + [64] = 27, + [65] = 28, + [66] = 29, + [67] = 30, + [68] = 7, + [69] = 9, + [70] = 32, + [71] = 18, + [72] = 16, + [73] = 10, + [74] = 8, + [75] = 75, + [76] = 33, + [77] = 19, + [78] = 6, + [79] = 33, + [80] = 19, + [81] = 20, + [82] = 21, + [83] = 22, + [84] = 25, + [85] = 26, + [86] = 27, + [87] = 28, + [88] = 29, + [89] = 30, + [90] = 32, + [91] = 14, + [92] = 8, + [93] = 10, + [94] = 16, + [95] = 31, + [96] = 96, + [97] = 18, + [98] = 98, + [99] = 98, + [100] = 100, + [101] = 101, + [102] = 17, + [103] = 103, + [104] = 104, + [105] = 105, + [106] = 106, + [107] = 23, + [108] = 15, + [109] = 109, + [110] = 105, + [111] = 98, + [112] = 101, + [113] = 103, + [114] = 109, + [115] = 105, + [116] = 101, + [117] = 109, + [118] = 105, + [119] = 109, + [120] = 36, + [121] = 121, + [122] = 37, + [123] = 123, + [124] = 124, + [125] = 125, + [126] = 126, + [127] = 127, + [128] = 128, + [129] = 129, + [130] = 130, + [131] = 130, + [132] = 132, + [133] = 132, + [134] = 134, + [135] = 134, + [136] = 136, + [137] = 137, + [138] = 137, + [139] = 139, + [140] = 140, + [141] = 140, + [142] = 142, + [143] = 143, + [144] = 143, + [145] = 142, + [146] = 38, + [147] = 41, + [148] = 148, + [149] = 43, + [150] = 148, + [151] = 40, + [152] = 42, + [153] = 44, + [154] = 154, + [155] = 154, + [156] = 46, + [157] = 47, + [158] = 158, + [159] = 159, + [160] = 45, + [161] = 161, + [162] = 161, + [163] = 163, + [164] = 75, + [165] = 165, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 172, + [173] = 173, + [174] = 174, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 178, + [179] = 179, + [180] = 180, + [181] = 181, + [182] = 182, + [183] = 183, + [184] = 181, + [185] = 185, + [186] = 186, + [187] = 186, + [188] = 182, + [189] = 181, + [190] = 182, + [191] = 185, + [192] = 192, + [193] = 186, + [194] = 185, + [195] = 195, + [196] = 136, + [197] = 139, + [198] = 198, + [199] = 199, + [200] = 200, + [201] = 201, + [202] = 202, + [203] = 203, + [204] = 204, + [205] = 205, + [206] = 206, + [207] = 207, + [208] = 208, + [209] = 209, + [210] = 165, + [211] = 166, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 216, + [217] = 217, + [218] = 218, + [219] = 219, + [220] = 220, + [221] = 221, + [222] = 222, + [223] = 223, + [224] = 224, + [225] = 225, + [226] = 226, + [227] = 227, + [228] = 228, + [229] = 229, + [230] = 230, + [231] = 231, + [232] = 232, + [233] = 233, + [234] = 173, + [235] = 235, + [236] = 236, + [237] = 237, + [238] = 238, + [239] = 239, + [240] = 240, + [241] = 241, + [242] = 242, + [243] = 243, + [244] = 244, + [245] = 245, + [246] = 246, + [247] = 247, + [248] = 248, + [249] = 249, + [250] = 250, + [251] = 251, + [252] = 252, + [253] = 253, + [254] = 254, + [255] = 255, + [256] = 256, + [257] = 257, + [258] = 258, + [259] = 259, + [260] = 260, + [261] = 261, + [262] = 262, + [263] = 263, + [264] = 264, + [265] = 265, + [266] = 266, + [267] = 267, + [268] = 268, + [269] = 269, + [270] = 270, + [271] = 271, + [272] = 272, + [273] = 273, + [274] = 274, + [275] = 275, + [276] = 276, + [277] = 277, + [278] = 278, + [279] = 279, + [280] = 280, + [281] = 281, + [282] = 282, + [283] = 283, + [284] = 284, + [285] = 285, + [286] = 286, + [287] = 287, + [288] = 288, + [289] = 289, + [290] = 290, + [291] = 291, + [292] = 292, + [293] = 293, + [294] = 294, + [295] = 295, + [296] = 296, + [297] = 297, + [298] = 298, + [299] = 299, + [300] = 300, + [301] = 301, + [302] = 302, + [303] = 303, + [304] = 304, + [305] = 305, + [306] = 306, + [307] = 307, + [308] = 308, + [309] = 309, + [310] = 310, + [311] = 311, + [312] = 312, + [313] = 313, + [314] = 314, + [315] = 315, + [316] = 316, + [317] = 317, + [318] = 318, + [319] = 319, + [320] = 320, + [321] = 321, + [322] = 322, + [323] = 323, + [324] = 324, + [325] = 325, + [326] = 326, + [327] = 14, + [328] = 328, + [329] = 329, + [330] = 330, + [331] = 331, + [332] = 332, + [333] = 333, + [334] = 334, + [335] = 322, + [336] = 324, + [337] = 328, + [338] = 338, + [339] = 329, + [340] = 340, + [341] = 341, + [342] = 332, + [343] = 332, + [344] = 333, + [345] = 322, + [346] = 346, + [347] = 324, + [348] = 328, + [349] = 349, + [350] = 329, + [351] = 351, + [352] = 333, + [353] = 353, + [354] = 354, + [355] = 355, + [356] = 356, + [357] = 357, + [358] = 358, + [359] = 359, + [360] = 360, + [361] = 361, + [362] = 362, + [363] = 363, + [364] = 364, + [365] = 365, + [366] = 366, + [367] = 367, + [368] = 368, + [369] = 369, + [370] = 370, + [371] = 371, + [372] = 372, + [373] = 373, + [374] = 374, + [375] = 375, + [376] = 376, + [377] = 377, + [378] = 378, + [379] = 379, + [380] = 380, + [381] = 381, + [382] = 382, + [383] = 383, + [384] = 384, + [385] = 385, + [386] = 386, + [387] = 387, + [388] = 388, + [389] = 389, + [390] = 387, + [391] = 391, + [392] = 392, + [393] = 392, + [394] = 394, + [395] = 395, + [396] = 396, + [397] = 397, + [398] = 398, + [399] = 388, + [400] = 387, +}; + +const TSCharacterRange sym_identifier_character_set_1[] = { + {0, 0x08}, {0x0e, 0x1f}, {'!', '$'}, {'&', '\''}, {'0', ':'}, {'?', 'Z'}, {'\\', '\\'}, {'_', 'z'}, + {0x7f, 0x10ffff}, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(86); + ADVANCE_MAP( + '!', 26, + '"', 10, + '#', 51, + '%', 149, + '&', 155, + '(', 103, + ')', 104, + '*', 146, + '+', 142, + ',', 100, + '-', 137, + '.', 159, + '/', 147, + '0', 162, + ':', 125, + ';', 89, + '<', 127, + '=', 102, + '>', 128, + '?', 124, + '[', 160, + ']', 161, + '^', 144, + '`', 84, + 'a', 179, + 'c', 182, + 'n', 183, + '{', 106, + '|', 143, + '}', 107, + '~', 157, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(164); + if (lookahead == '$' || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 1: + ADVANCE_MAP( + ' ', 88, + '"', 11, + '/', 15, + ';', 25, + '<', 34, + '>', 34, + '`', 84, + 'a', 179, + 'c', 182, + 'n', 183, + '{', 19, + '=', 80, + '^', 80, + ); + if (('\t' <= lookahead && lookahead <= '\r')) SKIP(1); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(90); + if (lookahead == '$' || + lookahead == '%' || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 2: + ADVANCE_MAP( + ' ', 88, + '"', 11, + '/', 15, + ';', 25, + '<', 34, + '>', 34, + '{', 19, + '=', 80, + '^', 80, + ); + if (('\t' <= lookahead && lookahead <= '\r')) SKIP(2); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(91); + END_STATE(); + case 3: + ADVANCE_MAP( + ' ', 88, + '/', 15, + ';', 25, + '`', 84, + 'a', 179, + 'c', 182, + 'n', 183, + '{', 19, + ); + if (('\t' <= lookahead && lookahead <= '\r')) SKIP(3); + if (lookahead == '$' || + lookahead == '%' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 4: + ADVANCE_MAP( + '!', 26, + '"', 10, + '%', 149, + '&', 155, + '(', 103, + '*', 146, + '+', 142, + '-', 137, + '.', 159, + '/', 147, + '0', 162, + ';', 89, + '<', 127, + '=', 102, + '>', 128, + '?', 124, + '[', 160, + '^', 144, + '`', 84, + '{', 106, + '|', 143, + '}', 107, + '~', 157, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(164); + if (lookahead == '$' || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 5: + ADVANCE_MAP( + '!', 26, + '"', 10, + '%', 177, + '&', 28, + '(', 103, + ')', 104, + '*', 29, + '+', 142, + ',', 100, + '-', 138, + '/', 16, + '0', 162, + ':', 125, + ';', 89, + '<', 127, + '=', 102, + '>', 128, + '?', 124, + '[', 160, + ']', 161, + '^', 145, + '`', 84, + '{', 106, + '|', 143, + '}', 107, + '~', 158, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(5); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(164); + if (lookahead == '$' || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 6: + ADVANCE_MAP( + '!', 26, + '%', 149, + '&', 155, + '(', 103, + ')', 104, + '*', 146, + '+', 142, + ',', 100, + '-', 141, + '.', 159, + '/', 147, + ':', 125, + ';', 89, + '<', 127, + '=', 102, + '>', 128, + '?', 124, + ']', 161, + '^', 144, + '`', 84, + '{', 106, + '|', 143, + '~', 157, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(6); + if (lookahead == '$' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 7: + ADVANCE_MAP( + '!', 26, + '%', 148, + '&', 155, + ')', 104, + '*', 146, + '+', 142, + ',', 100, + '-', 140, + '.', 159, + '/', 147, + ':', 125, + ';', 89, + '<', 127, + '=', 102, + '>', 128, + '?', 124, + ']', 161, + '^', 144, + '{', 106, + '|', 143, + '~', 157, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(7); + END_STATE(); + case 8: + ADVANCE_MAP( + '!', 26, + '%', 27, + '&', 28, + ')', 104, + '*', 29, + '+', 142, + ',', 100, + '-', 140, + '/', 16, + ':', 125, + ';', 89, + '<', 127, + '=', 102, + '>', 128, + '?', 124, + ']', 161, + '^', 145, + '{', 106, + '|', 143, + '~', 14, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(8); + END_STATE(); + case 9: + ADVANCE_MAP( + '"', 10, + '(', 103, + ')', 104, + ',', 100, + '-', 139, + '/', 15, + '0', 162, + ':', 125, + ';', 89, + '[', 160, + ']', 161, + '`', 84, + '{', 106, + '}', 107, + '~', 156, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(9); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(164); + if (lookahead == '$' || + lookahead == '%' || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 10: + if (lookahead == '"') ADVANCE(169); + if (lookahead != 0) ADVANCE(10); + END_STATE(); + case 11: + if (lookahead == '"') ADVANCE(168); + if (lookahead != 0) ADVANCE(11); + END_STATE(); + case 12: + if (lookahead == '"') ADVANCE(170); + if (lookahead != 0) ADVANCE(12); + END_STATE(); + case 13: + if (lookahead == '"') ADVANCE(12); + if (lookahead == ')') ADVANCE(104); + if (lookahead == '-') ADVANCE(24); + if (lookahead == '/') ADVANCE(15); + if (lookahead == '0') ADVANCE(163); + if (lookahead == ';') ADVANCE(25); + if (lookahead == '{') ADVANCE(19); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(13); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 14: + if (lookahead == '%') ADVANCE(32); + if (lookahead == '/') ADVANCE(33); + if (lookahead == '>') ADVANCE(37); + END_STATE(); + case 15: + if (lookahead == '*') ADVANCE(18); + if (lookahead == '/') ADVANCE(195); + END_STATE(); + case 16: + if (lookahead == '*') ADVANCE(18); + if (lookahead == '/') ADVANCE(195); + if (lookahead == '=') ADVANCE(111); + END_STATE(); + case 17: + if (lookahead == '*') ADVANCE(17); + if (lookahead == '/') ADVANCE(194); + if (lookahead != 0) ADVANCE(18); + END_STATE(); + case 18: + if (lookahead == '*') ADVANCE(17); + if (lookahead != 0) ADVANCE(18); + END_STATE(); + case 19: + if (lookahead == '-') ADVANCE(21); + END_STATE(); + case 20: + if (lookahead == '-') ADVANCE(20); + if (lookahead == '}') ADVANCE(194); + if (lookahead != 0) ADVANCE(21); + END_STATE(); + case 21: + if (lookahead == '-') ADVANCE(20); + if (lookahead != 0) ADVANCE(21); + END_STATE(); + case 22: + if (lookahead == '-') ADVANCE(57); + END_STATE(); + case 23: + if (lookahead == '-') ADVANCE(60); + END_STATE(); + case 24: + if (lookahead == '0') ADVANCE(163); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 25: + if (lookahead == ';') ADVANCE(195); + END_STATE(); + case 26: + if (lookahead == '=') ADVANCE(131); + END_STATE(); + case 27: + if (lookahead == '=') ADVANCE(114); + END_STATE(); + case 28: + if (lookahead == '=') ADVANCE(121); + END_STATE(); + case 29: + if (lookahead == '=') ADVANCE(110); + END_STATE(); + case 30: + if (lookahead == '=') ADVANCE(116); + END_STATE(); + case 31: + if (lookahead == '=') ADVANCE(113); + END_STATE(); + case 32: + if (lookahead == '=') ADVANCE(115); + END_STATE(); + case 33: + if (lookahead == '=') ADVANCE(112); + END_STATE(); + case 34: + if (lookahead == '=') ADVANCE(80); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(91); + END_STATE(); + case 35: + if (lookahead == '>') ADVANCE(105); + END_STATE(); + case 36: + if (lookahead == '>') ADVANCE(136); + END_STATE(); + case 37: + if (lookahead == '>') ADVANCE(135); + END_STATE(); + case 38: + if (lookahead == '`') ADVANCE(173); + if (lookahead != 0) ADVANCE(38); + END_STATE(); + case 39: + if (lookahead == 'a') ADVANCE(50); + END_STATE(); + case 40: + if (lookahead == 'a') ADVANCE(96); + END_STATE(); + case 41: + if (lookahead == 'a') ADVANCE(74); + END_STATE(); + case 42: + if (lookahead == 'a') ADVANCE(77); + END_STATE(); + case 43: + if (lookahead == 'c') ADVANCE(56); + END_STATE(); + case 44: + if (lookahead == 'c') ADVANCE(42); + END_STATE(); + case 45: + if (lookahead == 'd') ADVANCE(47); + END_STATE(); + case 46: + if (lookahead == 'd') ADVANCE(52); + END_STATE(); + case 47: + if (lookahead == 'e') ADVANCE(87); + END_STATE(); + case 48: + if (lookahead == 'e') ADVANCE(70); + END_STATE(); + case 49: + if (lookahead == 'f') ADVANCE(53); + END_STATE(); + case 50: + if (lookahead == 'g') ADVANCE(58); + END_STATE(); + case 51: + if (lookahead == 'i') ADVANCE(61); + if (lookahead == 'p') ADVANCE(69); + END_STATE(); + case 52: + if (lookahead == 'i') ADVANCE(49); + END_STATE(); + case 53: + if (lookahead == 'i') ADVANCE(44); + END_STATE(); + case 54: + if (lookahead == 'i') ADVANCE(64); + END_STATE(); + case 55: + if (lookahead == 'i') ADVANCE(67); + END_STATE(); + case 56: + if (lookahead == 'l') ADVANCE(78); + END_STATE(); + case 57: + if (lookahead == 'l') ADVANCE(76); + END_STATE(); + case 58: + if (lookahead == 'm') ADVANCE(40); + END_STATE(); + case 59: + if (lookahead == 'm') ADVANCE(22); + END_STATE(); + case 60: + if (lookahead == 'm') ADVANCE(65); + END_STATE(); + case 61: + if (lookahead == 'n') ADVANCE(43); + END_STATE(); + case 62: + if (lookahead == 'n') ADVANCE(97); + END_STATE(); + case 63: + if (lookahead == 'n') ADVANCE(98); + END_STATE(); + case 64: + if (lookahead == 'o') ADVANCE(62); + END_STATE(); + case 65: + if (lookahead == 'o') ADVANCE(46); + END_STATE(); + case 66: + if (lookahead == 'o') ADVANCE(73); + END_STATE(); + case 67: + if (lookahead == 'o') ADVANCE(63); + END_STATE(); + case 68: + if (lookahead == 'p') ADVANCE(66); + END_STATE(); + case 69: + if (lookahead == 'r') ADVANCE(39); + END_STATE(); + case 70: + if (lookahead == 'r') ADVANCE(72); + END_STATE(); + case 71: + if (lookahead == 'r') ADVANCE(99); + END_STATE(); + case 72: + if (lookahead == 's') ADVANCE(54); + END_STATE(); + case 73: + if (lookahead == 's') ADVANCE(75); + END_STATE(); + case 74: + if (lookahead == 's') ADVANCE(59); + END_STATE(); + case 75: + if (lookahead == 't') ADVANCE(23); + END_STATE(); + case 76: + if (lookahead == 't') ADVANCE(71); + END_STATE(); + case 77: + if (lookahead == 't') ADVANCE(55); + END_STATE(); + case 78: + if (lookahead == 'u') ADVANCE(45); + END_STATE(); + case 79: + if (lookahead == 'v') ADVANCE(48); + END_STATE(); + case 80: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(91); + END_STATE(); + case 81: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(92); + END_STATE(); + case 82: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(95); + END_STATE(); + case 83: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(167); + END_STATE(); + case 84: + if (lookahead != 0 && + lookahead != '`') ADVANCE(38); + END_STATE(); + case 85: + if (eof) ADVANCE(86); + ADVANCE_MAP( + '"', 11, + '#', 51, + '(', 103, + ')', 104, + ',', 100, + '-', 35, + '/', 15, + ';', 89, + '=', 101, + '[', 160, + ']', 161, + '`', 84, + '{', 106, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(85); + if (lookahead == '$' || + lookahead == '%' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + ('_' <= lookahead && lookahead <= 'z')) ADVANCE(193); + END_STATE(); + case 86: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 87: + ACCEPT_TOKEN(anon_sym_POUNDinclude); + END_STATE(); + case 88: + ACCEPT_TOKEN(anon_sym_SPACE); + if (lookahead == ' ') ADVANCE(88); + END_STATE(); + case 89: + ACCEPT_TOKEN(anon_sym_SEMI); + if (lookahead == ';') ADVANCE(195); + END_STATE(); + case 90: + ACCEPT_TOKEN(sym_version_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(90); + if (lookahead == '\t' || + (0x0b <= lookahead && lookahead <= '\r') || + lookahead == ' ' || + lookahead == '%' || + ('(' <= lookahead && lookahead <= '/') || + (';' <= lookahead && lookahead <= '>') || + lookahead == '[' || + lookahead == ']' || + lookahead == '^' || + ('{' <= lookahead && lookahead <= '~')) ADVANCE(82); + if (lookahead != 0 && + (lookahead < '\t' || '\r' < lookahead)) ADVANCE(191); + END_STATE(); + case 91: + ACCEPT_TOKEN(sym_version_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(91); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(82); + END_STATE(); + case 92: + ACCEPT_TOKEN(sym_version_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(92); + END_STATE(); + case 93: + ACCEPT_TOKEN(sym_version_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(93); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 94: + ACCEPT_TOKEN(sym_version_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(94); + if (lookahead == '\t' || + (0x0b <= lookahead && lookahead <= '\r') || + lookahead == ' ' || + lookahead == '%' || + ('(' <= lookahead && lookahead <= '/') || + (';' <= lookahead && lookahead <= '>') || + lookahead == '[' || + lookahead == ']' || + lookahead == '^' || + ('{' <= lookahead && lookahead <= '~')) ADVANCE(81); + if (lookahead != 0 && + (lookahead < '\t' || '\r' < lookahead)) ADVANCE(190); + END_STATE(); + case 95: + ACCEPT_TOKEN(sym_version_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(95); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(81); + END_STATE(); + case 96: + ACCEPT_TOKEN(anon_sym_POUNDpragma); + END_STATE(); + case 97: + ACCEPT_TOKEN(anon_sym_not_DASHversion); + END_STATE(); + case 98: + ACCEPT_TOKEN(anon_sym_allow_DASHpost_DASHmodification); + END_STATE(); + case 99: + ACCEPT_TOKEN(anon_sym_compute_DASHasm_DASHltr); + END_STATE(); + case 100: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 101: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(126); + END_STATE(); + case 103: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 104: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 105: + ACCEPT_TOKEN(anon_sym_DASH_GT); + END_STATE(); + case 106: + ACCEPT_TOKEN(anon_sym_LBRACE); + if (lookahead == '-') ADVANCE(21); + END_STATE(); + case 107: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 108: + ACCEPT_TOKEN(anon_sym_PLUS_EQ); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_DASH_EQ); + END_STATE(); + case 110: + ACCEPT_TOKEN(anon_sym_STAR_EQ); + END_STATE(); + case 111: + ACCEPT_TOKEN(anon_sym_SLASH_EQ); + END_STATE(); + case 112: + ACCEPT_TOKEN(anon_sym_TILDE_SLASH_EQ); + END_STATE(); + case 113: + ACCEPT_TOKEN(anon_sym_CARET_SLASH_EQ); + END_STATE(); + case 114: + ACCEPT_TOKEN(anon_sym_PERCENT_EQ); + END_STATE(); + case 115: + ACCEPT_TOKEN(anon_sym_TILDE_PERCENT_EQ); + END_STATE(); + case 116: + ACCEPT_TOKEN(anon_sym_CARET_PERCENT_EQ); + END_STATE(); + case 117: + ACCEPT_TOKEN(anon_sym_LT_LT_EQ); + END_STATE(); + case 118: + ACCEPT_TOKEN(anon_sym_GT_GT_EQ); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_TILDE_GT_GT_EQ); + END_STATE(); + case 120: + ACCEPT_TOKEN(anon_sym_CARET_GT_GT_EQ); + END_STATE(); + case 121: + ACCEPT_TOKEN(anon_sym_AMP_EQ); + END_STATE(); + case 122: + ACCEPT_TOKEN(anon_sym_PIPE_EQ); + END_STATE(); + case 123: + ACCEPT_TOKEN(anon_sym_CARET_EQ); + END_STATE(); + case 124: + ACCEPT_TOKEN(anon_sym_QMARK); + END_STATE(); + case 125: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 126: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(133); + if (lookahead == '=') ADVANCE(129); + END_STATE(); + case 128: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(130); + if (lookahead == '>') ADVANCE(134); + END_STATE(); + case 129: + ACCEPT_TOKEN(anon_sym_LT_EQ); + if (lookahead == '>') ADVANCE(132); + END_STATE(); + case 130: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 131: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 132: + ACCEPT_TOKEN(anon_sym_LT_EQ_GT); + END_STATE(); + case 133: + ACCEPT_TOKEN(anon_sym_LT_LT); + if (lookahead == '=') ADVANCE(117); + END_STATE(); + case 134: + ACCEPT_TOKEN(anon_sym_GT_GT); + if (lookahead == '=') ADVANCE(118); + END_STATE(); + case 135: + ACCEPT_TOKEN(anon_sym_TILDE_GT_GT); + if (lookahead == '=') ADVANCE(119); + END_STATE(); + case 136: + ACCEPT_TOKEN(anon_sym_CARET_GT_GT); + if (lookahead == '=') ADVANCE(120); + END_STATE(); + case 137: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '0') ADVANCE(163); + if (lookahead == '=') ADVANCE(109); + if (lookahead == '>') ADVANCE(105); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '0') ADVANCE(163); + if (lookahead == '=') ADVANCE(109); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 139: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '0') ADVANCE(163); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 140: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '=') ADVANCE(109); + END_STATE(); + case 141: + ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == '=') ADVANCE(109); + if (lookahead == '>') ADVANCE(105); + END_STATE(); + case 142: + ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == '=') ADVANCE(108); + END_STATE(); + case 143: + ACCEPT_TOKEN(anon_sym_PIPE); + if (lookahead == '=') ADVANCE(122); + END_STATE(); + case 144: + ACCEPT_TOKEN(anon_sym_CARET); + if (lookahead == '%') ADVANCE(153); + if (lookahead == '/') ADVANCE(151); + if (lookahead == '=') ADVANCE(123); + if (lookahead == '>') ADVANCE(36); + END_STATE(); + case 145: + ACCEPT_TOKEN(anon_sym_CARET); + if (lookahead == '%') ADVANCE(30); + if (lookahead == '/') ADVANCE(31); + if (lookahead == '=') ADVANCE(123); + if (lookahead == '>') ADVANCE(36); + END_STATE(); + case 146: + ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == '=') ADVANCE(110); + END_STATE(); + case 147: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '%') ADVANCE(154); + if (lookahead == '*') ADVANCE(18); + if (lookahead == '/') ADVANCE(195); + if (lookahead == '=') ADVANCE(111); + END_STATE(); + case 148: + ACCEPT_TOKEN(anon_sym_PERCENT); + if (lookahead == '=') ADVANCE(114); + END_STATE(); + case 149: + ACCEPT_TOKEN(anon_sym_PERCENT); + if (lookahead == '=') ADVANCE(114); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 150: + ACCEPT_TOKEN(anon_sym_TILDE_SLASH); + if (lookahead == '=') ADVANCE(112); + END_STATE(); + case 151: + ACCEPT_TOKEN(anon_sym_CARET_SLASH); + if (lookahead == '=') ADVANCE(113); + END_STATE(); + case 152: + ACCEPT_TOKEN(anon_sym_TILDE_PERCENT); + if (lookahead == '=') ADVANCE(115); + END_STATE(); + case 153: + ACCEPT_TOKEN(anon_sym_CARET_PERCENT); + if (lookahead == '=') ADVANCE(116); + END_STATE(); + case 154: + ACCEPT_TOKEN(anon_sym_SLASH_PERCENT); + END_STATE(); + case 155: + ACCEPT_TOKEN(anon_sym_AMP); + if (lookahead == '=') ADVANCE(121); + END_STATE(); + case 156: + ACCEPT_TOKEN(anon_sym_TILDE); + END_STATE(); + case 157: + ACCEPT_TOKEN(anon_sym_TILDE); + if (lookahead == '%') ADVANCE(152); + if (lookahead == '/') ADVANCE(150); + if (lookahead == '>') ADVANCE(37); + END_STATE(); + case 158: + ACCEPT_TOKEN(anon_sym_TILDE); + if (lookahead == '%') ADVANCE(32); + if (lookahead == '/') ADVANCE(33); + if (lookahead == '>') ADVANCE(37); + END_STATE(); + case 159: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 160: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 161: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 162: + ACCEPT_TOKEN(aux_sym_number_literal_token1); + if (lookahead == 'x') ADVANCE(192); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(164); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 163: + ACCEPT_TOKEN(aux_sym_number_literal_token1); + if (lookahead == 'x') ADVANCE(83); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 164: + ACCEPT_TOKEN(aux_sym_number_literal_token1); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(164); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 165: + ACCEPT_TOKEN(aux_sym_number_literal_token1); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(165); + END_STATE(); + case 166: + ACCEPT_TOKEN(aux_sym_number_literal_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(166); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 167: + ACCEPT_TOKEN(aux_sym_number_literal_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(167); + END_STATE(); + case 168: + ACCEPT_TOKEN(sym_string_literal); + END_STATE(); + case 169: + ACCEPT_TOKEN(sym_string_literal); + if (lookahead == 'a' || + lookahead == 's') ADVANCE(172); + if (lookahead == 'H' || + lookahead == 'c' || + lookahead == 'h' || + lookahead == 'u') ADVANCE(171); + END_STATE(); + case 170: + ACCEPT_TOKEN(sym_string_literal); + if (lookahead == 'H' || + lookahead == 'c' || + lookahead == 'h' || + lookahead == 'u') ADVANCE(171); + END_STATE(); + case 171: + ACCEPT_TOKEN(sym_number_string_literal); + END_STATE(); + case 172: + ACCEPT_TOKEN(sym_slice_string_literal); + END_STATE(); + case 173: + ACCEPT_TOKEN(sym_identifier); + END_STATE(); + case 174: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '-') ADVANCE(79); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 175: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '-') ADVANCE(68); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 176: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '-') ADVANCE(41); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 177: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == '=') ADVANCE(114); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 178: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(176); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 179: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(180); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 180: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(184); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 181: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'm') ADVANCE(185); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 182: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(181); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 183: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(186); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 184: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(189); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 185: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'p') ADVANCE(188); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 186: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(174); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 187: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(178); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 188: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'u') ADVANCE(187); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 189: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'w') ADVANCE(175); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 190: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(93); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 191: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(94); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 192: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(166); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 193: + ACCEPT_TOKEN(sym_identifier); + if ((!eof && set_contains(sym_identifier_character_set_1, 9, lookahead))) ADVANCE(193); + END_STATE(); + case 194: + ACCEPT_TOKEN(sym_comment); + END_STATE(); + case 195: + ACCEPT_TOKEN(sym_comment); + if (lookahead != 0 && + lookahead != '\n' && + lookahead != '\r') ADVANCE(195); + END_STATE(); + default: + return false; + } +} + +static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + ADVANCE_MAP( + '_', 1, + 'a', 2, + 'b', 3, + 'c', 4, + 'd', 5, + 'e', 6, + 'f', 7, + 'g', 8, + 'i', 9, + 'm', 10, + 'r', 11, + 's', 12, + 't', 13, + 'u', 14, + 'v', 15, + 'w', 16, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + END_STATE(); + case 1: + ACCEPT_TOKEN(sym_underscore); + END_STATE(); + case 2: + if (lookahead == 's') ADVANCE(17); + END_STATE(); + case 3: + if (lookahead == 'u') ADVANCE(18); + END_STATE(); + case 4: + if (lookahead == 'a') ADVANCE(19); + if (lookahead == 'e') ADVANCE(20); + if (lookahead == 'o') ADVANCE(21); + END_STATE(); + case 5: + if (lookahead == 'o') ADVANCE(22); + END_STATE(); + case 6: + if (lookahead == 'l') ADVANCE(23); + END_STATE(); + case 7: + if (lookahead == 'o') ADVANCE(24); + END_STATE(); + case 8: + if (lookahead == 'l') ADVANCE(25); + END_STATE(); + case 9: + if (lookahead == 'f') ADVANCE(26); + if (lookahead == 'm') ADVANCE(27); + if (lookahead == 'n') ADVANCE(28); + END_STATE(); + case 10: + if (lookahead == 'e') ADVANCE(29); + END_STATE(); + case 11: + if (lookahead == 'e') ADVANCE(30); + END_STATE(); + case 12: + if (lookahead == 'l') ADVANCE(31); + END_STATE(); + case 13: + if (lookahead == 'r') ADVANCE(32); + if (lookahead == 'u') ADVANCE(33); + if (lookahead == 'y') ADVANCE(34); + END_STATE(); + case 14: + if (lookahead == 'n') ADVANCE(35); + END_STATE(); + case 15: + if (lookahead == 'a') ADVANCE(36); + if (lookahead == 'e') ADVANCE(37); + END_STATE(); + case 16: + if (lookahead == 'h') ADVANCE(38); + END_STATE(); + case 17: + if (lookahead == 'm') ADVANCE(39); + END_STATE(); + case 18: + if (lookahead == 'i') ADVANCE(40); + END_STATE(); + case 19: + if (lookahead == 't') ADVANCE(41); + END_STATE(); + case 20: + if (lookahead == 'l') ADVANCE(42); + END_STATE(); + case 21: + if (lookahead == 'n') ADVANCE(43); + END_STATE(); + case 22: + ACCEPT_TOKEN(anon_sym_do); + END_STATE(); + case 23: + if (lookahead == 's') ADVANCE(44); + END_STATE(); + case 24: + if (lookahead == 'r') ADVANCE(45); + END_STATE(); + case 25: + if (lookahead == 'o') ADVANCE(46); + END_STATE(); + case 26: + ACCEPT_TOKEN(anon_sym_if); + if (lookahead == 'n') ADVANCE(47); + END_STATE(); + case 27: + if (lookahead == 'p') ADVANCE(48); + END_STATE(); + case 28: + if (lookahead == 'l') ADVANCE(49); + if (lookahead == 't') ADVANCE(50); + END_STATE(); + case 29: + if (lookahead == 't') ADVANCE(51); + END_STATE(); + case 30: + if (lookahead == 'p') ADVANCE(52); + if (lookahead == 't') ADVANCE(53); + END_STATE(); + case 31: + if (lookahead == 'i') ADVANCE(54); + END_STATE(); + case 32: + if (lookahead == 'y') ADVANCE(55); + END_STATE(); + case 33: + if (lookahead == 'p') ADVANCE(56); + END_STATE(); + case 34: + if (lookahead == 'p') ADVANCE(57); + END_STATE(); + case 35: + if (lookahead == 't') ADVANCE(58); + END_STATE(); + case 36: + if (lookahead == 'r') ADVANCE(59); + END_STATE(); + case 37: + if (lookahead == 'r') ADVANCE(60); + END_STATE(); + case 38: + if (lookahead == 'i') ADVANCE(61); + END_STATE(); + case 39: + ACCEPT_TOKEN(anon_sym_asm); + END_STATE(); + case 40: + if (lookahead == 'l') ADVANCE(62); + END_STATE(); + case 41: + if (lookahead == 'c') ADVANCE(63); + END_STATE(); + case 42: + if (lookahead == 'l') ADVANCE(64); + END_STATE(); + case 43: + if (lookahead == 's') ADVANCE(65); + if (lookahead == 't') ADVANCE(66); + END_STATE(); + case 44: + if (lookahead == 'e') ADVANCE(67); + END_STATE(); + case 45: + if (lookahead == 'a') ADVANCE(68); + END_STATE(); + case 46: + if (lookahead == 'b') ADVANCE(69); + END_STATE(); + case 47: + if (lookahead == 'o') ADVANCE(70); + END_STATE(); + case 48: + if (lookahead == 'u') ADVANCE(71); + END_STATE(); + case 49: + if (lookahead == 'i') ADVANCE(72); + END_STATE(); + case 50: + ACCEPT_TOKEN(anon_sym_int); + END_STATE(); + case 51: + if (lookahead == 'h') ADVANCE(73); + END_STATE(); + case 52: + if (lookahead == 'e') ADVANCE(74); + END_STATE(); + case 53: + if (lookahead == 'u') ADVANCE(75); + END_STATE(); + case 54: + if (lookahead == 'c') ADVANCE(76); + END_STATE(); + case 55: + ACCEPT_TOKEN(anon_sym_try); + END_STATE(); + case 56: + if (lookahead == 'l') ADVANCE(77); + END_STATE(); + case 57: + if (lookahead == 'e') ADVANCE(78); + END_STATE(); + case 58: + if (lookahead == 'i') ADVANCE(79); + END_STATE(); + case 59: + ACCEPT_TOKEN(sym_var_type); + END_STATE(); + case 60: + if (lookahead == 's') ADVANCE(80); + END_STATE(); + case 61: + if (lookahead == 'l') ADVANCE(81); + END_STATE(); + case 62: + if (lookahead == 'd') ADVANCE(82); + END_STATE(); + case 63: + if (lookahead == 'h') ADVANCE(83); + END_STATE(); + case 64: + ACCEPT_TOKEN(anon_sym_cell); + END_STATE(); + case 65: + if (lookahead == 't') ADVANCE(84); + END_STATE(); + case 66: + ACCEPT_TOKEN(anon_sym_cont); + END_STATE(); + case 67: + ACCEPT_TOKEN(anon_sym_else); + if (lookahead == 'i') ADVANCE(85); + END_STATE(); + case 68: + if (lookahead == 'l') ADVANCE(86); + END_STATE(); + case 69: + if (lookahead == 'a') ADVANCE(87); + END_STATE(); + case 70: + if (lookahead == 't') ADVANCE(88); + END_STATE(); + case 71: + if (lookahead == 'r') ADVANCE(89); + END_STATE(); + case 72: + if (lookahead == 'n') ADVANCE(90); + END_STATE(); + case 73: + if (lookahead == 'o') ADVANCE(91); + END_STATE(); + case 74: + if (lookahead == 'a') ADVANCE(92); + END_STATE(); + case 75: + if (lookahead == 'r') ADVANCE(93); + END_STATE(); + case 76: + if (lookahead == 'e') ADVANCE(94); + END_STATE(); + case 77: + if (lookahead == 'e') ADVANCE(95); + END_STATE(); + case 78: + ACCEPT_TOKEN(anon_sym_type); + END_STATE(); + case 79: + if (lookahead == 'l') ADVANCE(96); + END_STATE(); + case 80: + if (lookahead == 'i') ADVANCE(97); + END_STATE(); + case 81: + if (lookahead == 'e') ADVANCE(98); + END_STATE(); + case 82: + if (lookahead == 'e') ADVANCE(99); + END_STATE(); + case 83: + ACCEPT_TOKEN(anon_sym_catch); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_const); + END_STATE(); + case 85: + if (lookahead == 'f') ADVANCE(100); + END_STATE(); + case 86: + if (lookahead == 'l') ADVANCE(101); + END_STATE(); + case 87: + if (lookahead == 'l') ADVANCE(102); + END_STATE(); + case 88: + ACCEPT_TOKEN(anon_sym_ifnot); + END_STATE(); + case 89: + if (lookahead == 'e') ADVANCE(103); + END_STATE(); + case 90: + if (lookahead == 'e') ADVANCE(104); + END_STATE(); + case 91: + if (lookahead == 'd') ADVANCE(105); + END_STATE(); + case 92: + if (lookahead == 't') ADVANCE(106); + END_STATE(); + case 93: + if (lookahead == 'n') ADVANCE(107); + END_STATE(); + case 94: + ACCEPT_TOKEN(anon_sym_slice); + END_STATE(); + case 95: + ACCEPT_TOKEN(anon_sym_tuple); + END_STATE(); + case 96: + ACCEPT_TOKEN(anon_sym_until); + END_STATE(); + case 97: + if (lookahead == 'o') ADVANCE(108); + END_STATE(); + case 98: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 99: + if (lookahead == 'r') ADVANCE(109); + END_STATE(); + case 100: + ACCEPT_TOKEN(anon_sym_elseif); + if (lookahead == 'n') ADVANCE(110); + END_STATE(); + case 101: + ACCEPT_TOKEN(anon_sym_forall); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_global); + END_STATE(); + case 103: + ACCEPT_TOKEN(sym_impure); + END_STATE(); + case 104: + ACCEPT_TOKEN(anon_sym_inline); + if (lookahead == '_') ADVANCE(111); + END_STATE(); + case 105: + if (lookahead == '_') ADVANCE(112); + END_STATE(); + case 106: + ACCEPT_TOKEN(anon_sym_repeat); + END_STATE(); + case 107: + ACCEPT_TOKEN(anon_sym_return); + END_STATE(); + case 108: + if (lookahead == 'n') ADVANCE(113); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_builder); + END_STATE(); + case 110: + if (lookahead == 'o') ADVANCE(114); + END_STATE(); + case 111: + if (lookahead == 'r') ADVANCE(115); + END_STATE(); + case 112: + if (lookahead == 'i') ADVANCE(116); + END_STATE(); + case 113: + ACCEPT_TOKEN(anon_sym_version); + END_STATE(); + case 114: + if (lookahead == 't') ADVANCE(117); + END_STATE(); + case 115: + if (lookahead == 'e') ADVANCE(118); + END_STATE(); + case 116: + if (lookahead == 'd') ADVANCE(119); + END_STATE(); + case 117: + ACCEPT_TOKEN(anon_sym_elseifnot); + END_STATE(); + case 118: + if (lookahead == 'f') ADVANCE(120); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_method_id); + END_STATE(); + case 120: + ACCEPT_TOKEN(anon_sym_inline_ref); + END_STATE(); + default: + return false; + } +} + +static const TSLexerMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 85}, + [2] = {.lex_state = 4}, + [3] = {.lex_state = 4}, + [4] = {.lex_state = 4}, + [5] = {.lex_state = 4}, + [6] = {.lex_state = 4}, + [7] = {.lex_state = 4}, + [8] = {.lex_state = 4}, + [9] = {.lex_state = 4}, + [10] = {.lex_state = 4}, + [11] = {.lex_state = 9}, + [12] = {.lex_state = 9}, + [13] = {.lex_state = 9}, + [14] = {.lex_state = 4}, + [15] = {.lex_state = 4}, + [16] = {.lex_state = 4}, + [17] = {.lex_state = 4}, + [18] = {.lex_state = 4}, + [19] = {.lex_state = 4}, + [20] = {.lex_state = 4}, + [21] = {.lex_state = 4}, + [22] = {.lex_state = 4}, + [23] = {.lex_state = 4}, + [24] = {.lex_state = 4}, + [25] = {.lex_state = 4}, + [26] = {.lex_state = 4}, + [27] = {.lex_state = 4}, + [28] = {.lex_state = 4}, + [29] = {.lex_state = 4}, + [30] = {.lex_state = 4}, + [31] = {.lex_state = 4}, + [32] = {.lex_state = 4}, + [33] = {.lex_state = 4}, + [34] = {.lex_state = 9}, + [35] = {.lex_state = 9}, + [36] = {.lex_state = 4}, + [37] = {.lex_state = 4}, + [38] = {.lex_state = 5}, + [39] = {.lex_state = 5}, + [40] = {.lex_state = 5}, + [41] = {.lex_state = 5}, + [42] = {.lex_state = 5}, + [43] = {.lex_state = 5}, + [44] = {.lex_state = 5}, + [45] = {.lex_state = 5}, + [46] = {.lex_state = 5}, + [47] = {.lex_state = 5}, + [48] = {.lex_state = 6}, + [49] = {.lex_state = 6}, + [50] = {.lex_state = 6}, + [51] = {.lex_state = 6}, + [52] = {.lex_state = 6}, + [53] = {.lex_state = 6}, + [54] = {.lex_state = 6}, + [55] = {.lex_state = 6}, + [56] = {.lex_state = 7}, + [57] = {.lex_state = 6}, + [58] = {.lex_state = 6}, + [59] = {.lex_state = 6}, + [60] = {.lex_state = 6}, + [61] = {.lex_state = 7}, + [62] = {.lex_state = 6}, + [63] = {.lex_state = 6}, + [64] = {.lex_state = 6}, + [65] = {.lex_state = 6}, + [66] = {.lex_state = 6}, + [67] = {.lex_state = 6}, + [68] = {.lex_state = 6}, + [69] = {.lex_state = 6}, + [70] = {.lex_state = 6}, + [71] = {.lex_state = 6}, + [72] = {.lex_state = 6}, + [73] = {.lex_state = 6}, + [74] = {.lex_state = 6}, + [75] = {.lex_state = 5}, + [76] = {.lex_state = 6}, + [77] = {.lex_state = 6}, + [78] = {.lex_state = 7}, + [79] = {.lex_state = 7}, + [80] = {.lex_state = 7}, + [81] = {.lex_state = 7}, + [82] = {.lex_state = 7}, + [83] = {.lex_state = 7}, + [84] = {.lex_state = 7}, + [85] = {.lex_state = 7}, + [86] = {.lex_state = 7}, + [87] = {.lex_state = 7}, + [88] = {.lex_state = 7}, + [89] = {.lex_state = 7}, + [90] = {.lex_state = 7}, + [91] = {.lex_state = 7}, + [92] = {.lex_state = 6}, + [93] = {.lex_state = 6}, + [94] = {.lex_state = 7}, + [95] = {.lex_state = 7}, + [96] = {.lex_state = 9}, + [97] = {.lex_state = 7}, + [98] = {.lex_state = 6}, + [99] = {.lex_state = 6}, + [100] = {.lex_state = 9}, + [101] = {.lex_state = 6}, + [102] = {.lex_state = 7}, + [103] = {.lex_state = 9}, + [104] = {.lex_state = 9}, + [105] = {.lex_state = 9}, + [106] = {.lex_state = 5}, + [107] = {.lex_state = 7}, + [108] = {.lex_state = 7}, + [109] = {.lex_state = 9}, + [110] = {.lex_state = 9}, + [111] = {.lex_state = 6}, + [112] = {.lex_state = 6}, + [113] = {.lex_state = 9}, + [114] = {.lex_state = 9}, + [115] = {.lex_state = 9}, + [116] = {.lex_state = 6}, + [117] = {.lex_state = 9}, + [118] = {.lex_state = 9}, + [119] = {.lex_state = 9}, + [120] = {.lex_state = 7}, + [121] = {.lex_state = 9}, + [122] = {.lex_state = 7}, + [123] = {.lex_state = 9}, + [124] = {.lex_state = 9}, + [125] = {.lex_state = 9}, + [126] = {.lex_state = 5}, + [127] = {.lex_state = 9}, + [128] = {.lex_state = 9}, + [129] = {.lex_state = 9}, + [130] = {.lex_state = 9}, + [131] = {.lex_state = 9}, + [132] = {.lex_state = 9}, + [133] = {.lex_state = 9}, + [134] = {.lex_state = 9}, + [135] = {.lex_state = 9}, + [136] = {.lex_state = 5}, + [137] = {.lex_state = 9}, + [138] = {.lex_state = 9}, + [139] = {.lex_state = 5}, + [140] = {.lex_state = 9}, + [141] = {.lex_state = 9}, + [142] = {.lex_state = 9}, + [143] = {.lex_state = 9}, + [144] = {.lex_state = 9}, + [145] = {.lex_state = 9}, + [146] = {.lex_state = 8}, + [147] = {.lex_state = 8}, + [148] = {.lex_state = 9}, + [149] = {.lex_state = 8}, + [150] = {.lex_state = 9}, + [151] = {.lex_state = 8}, + [152] = {.lex_state = 8}, + [153] = {.lex_state = 8}, + [154] = {.lex_state = 9}, + [155] = {.lex_state = 9}, + [156] = {.lex_state = 0}, + [157] = {.lex_state = 0}, + [158] = {.lex_state = 85}, + [159] = {.lex_state = 85}, + [160] = {.lex_state = 0}, + [161] = {.lex_state = 9}, + [162] = {.lex_state = 9}, + [163] = {.lex_state = 9}, + [164] = {.lex_state = 0}, + [165] = {.lex_state = 9}, + [166] = {.lex_state = 9}, + [167] = {.lex_state = 9}, + [168] = {.lex_state = 9}, + [169] = {.lex_state = 9}, + [170] = {.lex_state = 9}, + [171] = {.lex_state = 9}, + [172] = {.lex_state = 9}, + [173] = {.lex_state = 9}, + [174] = {.lex_state = 9}, + [175] = {.lex_state = 9}, + [176] = {.lex_state = 9}, + [177] = {.lex_state = 9}, + [178] = {.lex_state = 9}, + [179] = {.lex_state = 9}, + [180] = {.lex_state = 9}, + [181] = {.lex_state = 85}, + [182] = {.lex_state = 85}, + [183] = {.lex_state = 85}, + [184] = {.lex_state = 85}, + [185] = {.lex_state = 85}, + [186] = {.lex_state = 85}, + [187] = {.lex_state = 85}, + [188] = {.lex_state = 85}, + [189] = {.lex_state = 85}, + [190] = {.lex_state = 85}, + [191] = {.lex_state = 85}, + [192] = {.lex_state = 85}, + [193] = {.lex_state = 85}, + [194] = {.lex_state = 85}, + [195] = {.lex_state = 85}, + [196] = {.lex_state = 0}, + [197] = {.lex_state = 0}, + [198] = {.lex_state = 85}, + [199] = {.lex_state = 85}, + [200] = {.lex_state = 85}, + [201] = {.lex_state = 85}, + [202] = {.lex_state = 85}, + [203] = {.lex_state = 85}, + [204] = {.lex_state = 85}, + [205] = {.lex_state = 85}, + [206] = {.lex_state = 85}, + [207] = {.lex_state = 85}, + [208] = {.lex_state = 85}, + [209] = {.lex_state = 85}, + [210] = {.lex_state = 85}, + [211] = {.lex_state = 85}, + [212] = {.lex_state = 85}, + [213] = {.lex_state = 85}, + [214] = {.lex_state = 85}, + [215] = {.lex_state = 85}, + [216] = {.lex_state = 85}, + [217] = {.lex_state = 85}, + [218] = {.lex_state = 85}, + [219] = {.lex_state = 85}, + [220] = {.lex_state = 85}, + [221] = {.lex_state = 85}, + [222] = {.lex_state = 85}, + [223] = {.lex_state = 85}, + [224] = {.lex_state = 85}, + [225] = {.lex_state = 85}, + [226] = {.lex_state = 85}, + [227] = {.lex_state = 85}, + [228] = {.lex_state = 85}, + [229] = {.lex_state = 85}, + [230] = {.lex_state = 85}, + [231] = {.lex_state = 85}, + [232] = {.lex_state = 85}, + [233] = {.lex_state = 85}, + [234] = {.lex_state = 85}, + [235] = {.lex_state = 85}, + [236] = {.lex_state = 85}, + [237] = {.lex_state = 85}, + [238] = {.lex_state = 85}, + [239] = {.lex_state = 85}, + [240] = {.lex_state = 85}, + [241] = {.lex_state = 85}, + [242] = {.lex_state = 85}, + [243] = {.lex_state = 85}, + [244] = {.lex_state = 1}, + [245] = {.lex_state = 85}, + [246] = {.lex_state = 85}, + [247] = {.lex_state = 85}, + [248] = {.lex_state = 85}, + [249] = {.lex_state = 85}, + [250] = {.lex_state = 85}, + [251] = {.lex_state = 85}, + [252] = {.lex_state = 85}, + [253] = {.lex_state = 85}, + [254] = {.lex_state = 85}, + [255] = {.lex_state = 85}, + [256] = {.lex_state = 85}, + [257] = {.lex_state = 85}, + [258] = {.lex_state = 85}, + [259] = {.lex_state = 85}, + [260] = {.lex_state = 85}, + [261] = {.lex_state = 3}, + [262] = {.lex_state = 85}, + [263] = {.lex_state = 85}, + [264] = {.lex_state = 13}, + [265] = {.lex_state = 13}, + [266] = {.lex_state = 13}, + [267] = {.lex_state = 85}, + [268] = {.lex_state = 85}, + [269] = {.lex_state = 85}, + [270] = {.lex_state = 13}, + [271] = {.lex_state = 85}, + [272] = {.lex_state = 85}, + [273] = {.lex_state = 85}, + [274] = {.lex_state = 13}, + [275] = {.lex_state = 85}, + [276] = {.lex_state = 85}, + [277] = {.lex_state = 85}, + [278] = {.lex_state = 85}, + [279] = {.lex_state = 13}, + [280] = {.lex_state = 0}, + [281] = {.lex_state = 85}, + [282] = {.lex_state = 85}, + [283] = {.lex_state = 85}, + [284] = {.lex_state = 85}, + [285] = {.lex_state = 85}, + [286] = {.lex_state = 0}, + [287] = {.lex_state = 85}, + [288] = {.lex_state = 85}, + [289] = {.lex_state = 0}, + [290] = {.lex_state = 85}, + [291] = {.lex_state = 85}, + [292] = {.lex_state = 85}, + [293] = {.lex_state = 85}, + [294] = {.lex_state = 85}, + [295] = {.lex_state = 0}, + [296] = {.lex_state = 85}, + [297] = {.lex_state = 0}, + [298] = {.lex_state = 85}, + [299] = {.lex_state = 0}, + [300] = {.lex_state = 0}, + [301] = {.lex_state = 0}, + [302] = {.lex_state = 0}, + [303] = {.lex_state = 0}, + [304] = {.lex_state = 0}, + [305] = {.lex_state = 0}, + [306] = {.lex_state = 85}, + [307] = {.lex_state = 85}, + [308] = {.lex_state = 0}, + [309] = {.lex_state = 0}, + [310] = {.lex_state = 0}, + [311] = {.lex_state = 0}, + [312] = {.lex_state = 0}, + [313] = {.lex_state = 0}, + [314] = {.lex_state = 85}, + [315] = {.lex_state = 85}, + [316] = {.lex_state = 85}, + [317] = {.lex_state = 0}, + [318] = {.lex_state = 0}, + [319] = {.lex_state = 0}, + [320] = {.lex_state = 0}, + [321] = {.lex_state = 85}, + [322] = {.lex_state = 0}, + [323] = {.lex_state = 85}, + [324] = {.lex_state = 0}, + [325] = {.lex_state = 85}, + [326] = {.lex_state = 2}, + [327] = {.lex_state = 13}, + [328] = {.lex_state = 0}, + [329] = {.lex_state = 0}, + [330] = {.lex_state = 0}, + [331] = {.lex_state = 2}, + [332] = {.lex_state = 0}, + [333] = {.lex_state = 0}, + [334] = {.lex_state = 0}, + [335] = {.lex_state = 0}, + [336] = {.lex_state = 0}, + [337] = {.lex_state = 0}, + [338] = {.lex_state = 85}, + [339] = {.lex_state = 0}, + [340] = {.lex_state = 0}, + [341] = {.lex_state = 0}, + [342] = {.lex_state = 0}, + [343] = {.lex_state = 0}, + [344] = {.lex_state = 0}, + [345] = {.lex_state = 0}, + [346] = {.lex_state = 0}, + [347] = {.lex_state = 0}, + [348] = {.lex_state = 0}, + [349] = {.lex_state = 0}, + [350] = {.lex_state = 0}, + [351] = {.lex_state = 0}, + [352] = {.lex_state = 0}, + [353] = {.lex_state = 0}, + [354] = {.lex_state = 85}, + [355] = {.lex_state = 85}, + [356] = {.lex_state = 0}, + [357] = {.lex_state = 0}, + [358] = {.lex_state = 85}, + [359] = {.lex_state = 2}, + [360] = {.lex_state = 2}, + [361] = {.lex_state = 0}, + [362] = {.lex_state = 85}, + [363] = {.lex_state = 0}, + [364] = {.lex_state = 0}, + [365] = {.lex_state = 0}, + [366] = {.lex_state = 0}, + [367] = {.lex_state = 0}, + [368] = {.lex_state = 85}, + [369] = {.lex_state = 0}, + [370] = {.lex_state = 0}, + [371] = {.lex_state = 85}, + [372] = {.lex_state = 85}, + [373] = {.lex_state = 0}, + [374] = {.lex_state = 0}, + [375] = {.lex_state = 0}, + [376] = {.lex_state = 0}, + [377] = {.lex_state = 0}, + [378] = {.lex_state = 0}, + [379] = {.lex_state = 0}, + [380] = {.lex_state = 2}, + [381] = {.lex_state = 0}, + [382] = {.lex_state = 0}, + [383] = {.lex_state = 0}, + [384] = {.lex_state = 85}, + [385] = {.lex_state = 0}, + [386] = {.lex_state = 85}, + [387] = {.lex_state = 85}, + [388] = {.lex_state = 85}, + [389] = {.lex_state = 0}, + [390] = {.lex_state = 85}, + [391] = {.lex_state = 0}, + [392] = {.lex_state = 0}, + [393] = {.lex_state = 0}, + [394] = {.lex_state = 85}, + [395] = {.lex_state = 85}, + [396] = {.lex_state = 0}, + [397] = {.lex_state = 85}, + [398] = {.lex_state = 0}, + [399] = {.lex_state = 85}, + [400] = {.lex_state = 85}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [STATE(0)] = { + [ts_builtin_sym_end] = ACTIONS(1), + [sym_identifier] = ACTIONS(1), + [anon_sym_POUNDinclude] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_POUNDpragma] = ACTIONS(1), + [anon_sym_version] = ACTIONS(1), + [anon_sym_not_DASHversion] = ACTIONS(1), + [anon_sym_allow_DASHpost_DASHmodification] = ACTIONS(1), + [anon_sym_compute_DASHasm_DASHltr] = ACTIONS(1), + [anon_sym_global] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_const] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [sym_impure] = ACTIONS(1), + [anon_sym_inline] = ACTIONS(1), + [anon_sym_inline_ref] = ACTIONS(1), + [anon_sym_method_id] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_forall] = ACTIONS(1), + [anon_sym_DASH_GT] = ACTIONS(1), + [anon_sym_type] = ACTIONS(1), + [anon_sym_asm] = ACTIONS(1), + [anon_sym_return] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_repeat] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_ifnot] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_elseif] = ACTIONS(1), + [anon_sym_elseifnot] = ACTIONS(1), + [anon_sym_do] = ACTIONS(1), + [anon_sym_until] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_try] = ACTIONS(1), + [anon_sym_catch] = ACTIONS(1), + [anon_sym_PLUS_EQ] = ACTIONS(1), + [anon_sym_DASH_EQ] = ACTIONS(1), + [anon_sym_STAR_EQ] = ACTIONS(1), + [anon_sym_SLASH_EQ] = ACTIONS(1), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(1), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(1), + [anon_sym_PERCENT_EQ] = ACTIONS(1), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(1), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(1), + [anon_sym_LT_LT_EQ] = ACTIONS(1), + [anon_sym_GT_GT_EQ] = ACTIONS(1), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(1), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(1), + [anon_sym_AMP_EQ] = ACTIONS(1), + [anon_sym_PIPE_EQ] = ACTIONS(1), + [anon_sym_CARET_EQ] = ACTIONS(1), + [anon_sym_QMARK] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_LT_EQ_GT] = ACTIONS(1), + [anon_sym_LT_LT] = ACTIONS(1), + [anon_sym_GT_GT] = ACTIONS(1), + [anon_sym_TILDE_GT_GT] = ACTIONS(1), + [anon_sym_CARET_GT_GT] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_CARET] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_PERCENT] = ACTIONS(1), + [anon_sym_TILDE_SLASH] = ACTIONS(1), + [anon_sym_CARET_SLASH] = ACTIONS(1), + [anon_sym_TILDE_PERCENT] = ACTIONS(1), + [anon_sym_CARET_PERCENT] = ACTIONS(1), + [anon_sym_SLASH_PERCENT] = ACTIONS(1), + [anon_sym_AMP] = ACTIONS(1), + [anon_sym_TILDE] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_int] = ACTIONS(1), + [anon_sym_cell] = ACTIONS(1), + [anon_sym_slice] = ACTIONS(1), + [anon_sym_builder] = ACTIONS(1), + [anon_sym_cont] = ACTIONS(1), + [anon_sym_tuple] = ACTIONS(1), + [sym_var_type] = ACTIONS(1), + [aux_sym_number_literal_token1] = ACTIONS(1), + [sym_string_literal] = ACTIONS(1), + [sym_number_string_literal] = ACTIONS(1), + [sym_slice_string_literal] = ACTIONS(1), + [sym_underscore] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + }, + [STATE(1)] = { + [sym_source_file] = STATE(383), + [sym__top_level_item] = STATE(158), + [sym_import_directive] = STATE(158), + [sym_pragma_directive] = STATE(158), + [sym_global_var_declarations] = STATE(158), + [sym_constant_declarations] = STATE(158), + [sym_function_declaration] = STATE(158), + [sym_type_parameters] = STATE(212), + [sym_empty_statement] = STATE(158), + [sym__type_hint] = STATE(395), + [sym_function_type] = STATE(395), + [sym__atomic_type] = STATE(260), + [sym__parenthesized_type] = STATE(260), + [sym_primitive_type] = STATE(260), + [sym_tensor_type] = STATE(260), + [sym_tuple_type] = STATE(260), + [sym_hole_type] = STATE(260), + [sym_type_identifier] = STATE(260), + [aux_sym_source_file_repeat1] = STATE(158), + [ts_builtin_sym_end] = ACTIONS(5), + [sym_identifier] = ACTIONS(7), + [anon_sym_POUNDinclude] = ACTIONS(9), + [anon_sym_SEMI] = ACTIONS(11), + [anon_sym_POUNDpragma] = ACTIONS(13), + [anon_sym_global] = ACTIONS(15), + [anon_sym_const] = ACTIONS(17), + [anon_sym_LPAREN] = ACTIONS(19), + [anon_sym_forall] = ACTIONS(21), + [anon_sym_LBRACK] = ACTIONS(23), + [anon_sym_int] = ACTIONS(25), + [anon_sym_cell] = ACTIONS(25), + [anon_sym_slice] = ACTIONS(25), + [anon_sym_builder] = ACTIONS(25), + [anon_sym_cont] = ACTIONS(25), + [anon_sym_tuple] = ACTIONS(25), + [sym_var_type] = ACTIONS(27), + [sym_underscore] = ACTIONS(29), + [sym_comment] = ACTIONS(3), + }, + [STATE(2)] = { + [sym_parenthesized_expression] = STATE(3), + [sym_tensor_expression] = STATE(3), + [aux_sym_function_application_repeat1] = STATE(3), + [sym_identifier] = ACTIONS(31), + [anon_sym_SEMI] = ACTIONS(31), + [anon_sym_EQ] = ACTIONS(31), + [anon_sym_LPAREN] = ACTIONS(33), + [anon_sym_return] = ACTIONS(31), + [anon_sym_LBRACE] = ACTIONS(31), + [anon_sym_RBRACE] = ACTIONS(33), + [anon_sym_repeat] = ACTIONS(31), + [anon_sym_if] = ACTIONS(31), + [anon_sym_ifnot] = ACTIONS(31), + [anon_sym_do] = ACTIONS(31), + [anon_sym_while] = ACTIONS(31), + [anon_sym_try] = ACTIONS(31), + [anon_sym_PLUS_EQ] = ACTIONS(33), + [anon_sym_DASH_EQ] = ACTIONS(33), + [anon_sym_STAR_EQ] = ACTIONS(33), + [anon_sym_SLASH_EQ] = ACTIONS(33), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(33), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(33), + [anon_sym_PERCENT_EQ] = ACTIONS(33), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(33), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(33), + [anon_sym_LT_LT_EQ] = ACTIONS(33), + [anon_sym_GT_GT_EQ] = ACTIONS(33), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(33), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(33), + [anon_sym_AMP_EQ] = ACTIONS(33), + [anon_sym_PIPE_EQ] = ACTIONS(33), + [anon_sym_CARET_EQ] = ACTIONS(33), + [anon_sym_QMARK] = ACTIONS(33), + [anon_sym_EQ_EQ] = ACTIONS(33), + [anon_sym_LT] = ACTIONS(31), + [anon_sym_GT] = ACTIONS(31), + [anon_sym_LT_EQ] = ACTIONS(31), + [anon_sym_GT_EQ] = ACTIONS(33), + [anon_sym_BANG_EQ] = ACTIONS(33), + [anon_sym_LT_EQ_GT] = ACTIONS(33), + [anon_sym_LT_LT] = ACTIONS(31), + [anon_sym_GT_GT] = ACTIONS(31), + [anon_sym_TILDE_GT_GT] = ACTIONS(31), + [anon_sym_CARET_GT_GT] = ACTIONS(31), + [anon_sym_DASH] = ACTIONS(31), + [anon_sym_PLUS] = ACTIONS(31), + [anon_sym_PIPE] = ACTIONS(31), + [anon_sym_CARET] = ACTIONS(31), + [anon_sym_STAR] = ACTIONS(31), + [anon_sym_SLASH] = ACTIONS(31), + [anon_sym_PERCENT] = ACTIONS(31), + [anon_sym_TILDE_SLASH] = ACTIONS(31), + [anon_sym_CARET_SLASH] = ACTIONS(31), + [anon_sym_TILDE_PERCENT] = ACTIONS(31), + [anon_sym_CARET_PERCENT] = ACTIONS(31), + [anon_sym_SLASH_PERCENT] = ACTIONS(33), + [anon_sym_AMP] = ACTIONS(31), + [anon_sym_TILDE] = ACTIONS(31), + [anon_sym_DOT] = ACTIONS(33), + [anon_sym_LBRACK] = ACTIONS(33), + [anon_sym_int] = ACTIONS(31), + [anon_sym_cell] = ACTIONS(31), + [anon_sym_slice] = ACTIONS(31), + [anon_sym_builder] = ACTIONS(31), + [anon_sym_cont] = ACTIONS(31), + [anon_sym_tuple] = ACTIONS(31), + [sym_var_type] = ACTIONS(31), + [aux_sym_number_literal_token1] = ACTIONS(31), + [sym_string_literal] = ACTIONS(31), + [sym_number_string_literal] = ACTIONS(33), + [sym_slice_string_literal] = ACTIONS(33), + [sym_underscore] = ACTIONS(31), + [sym_comment] = ACTIONS(3), + }, + [STATE(3)] = { + [sym_parenthesized_expression] = STATE(3), + [sym_tensor_expression] = STATE(3), + [aux_sym_function_application_repeat1] = STATE(3), + [sym_identifier] = ACTIONS(35), + [anon_sym_SEMI] = ACTIONS(38), + [anon_sym_EQ] = ACTIONS(38), + [anon_sym_LPAREN] = ACTIONS(40), + [anon_sym_return] = ACTIONS(38), + [anon_sym_LBRACE] = ACTIONS(38), + [anon_sym_RBRACE] = ACTIONS(43), + [anon_sym_repeat] = ACTIONS(38), + [anon_sym_if] = ACTIONS(38), + [anon_sym_ifnot] = ACTIONS(38), + [anon_sym_do] = ACTIONS(38), + [anon_sym_while] = ACTIONS(38), + [anon_sym_try] = ACTIONS(38), + [anon_sym_PLUS_EQ] = ACTIONS(43), + [anon_sym_DASH_EQ] = ACTIONS(43), + [anon_sym_STAR_EQ] = ACTIONS(43), + [anon_sym_SLASH_EQ] = ACTIONS(43), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(43), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(43), + [anon_sym_PERCENT_EQ] = ACTIONS(43), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(43), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(43), + [anon_sym_LT_LT_EQ] = ACTIONS(43), + [anon_sym_GT_GT_EQ] = ACTIONS(43), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(43), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(43), + [anon_sym_AMP_EQ] = ACTIONS(43), + [anon_sym_PIPE_EQ] = ACTIONS(43), + [anon_sym_CARET_EQ] = ACTIONS(43), + [anon_sym_QMARK] = ACTIONS(43), + [anon_sym_EQ_EQ] = ACTIONS(43), + [anon_sym_LT] = ACTIONS(38), + [anon_sym_GT] = ACTIONS(38), + [anon_sym_LT_EQ] = ACTIONS(38), + [anon_sym_GT_EQ] = ACTIONS(43), + [anon_sym_BANG_EQ] = ACTIONS(43), + [anon_sym_LT_EQ_GT] = ACTIONS(43), + [anon_sym_LT_LT] = ACTIONS(38), + [anon_sym_GT_GT] = ACTIONS(38), + [anon_sym_TILDE_GT_GT] = ACTIONS(38), + [anon_sym_CARET_GT_GT] = ACTIONS(38), + [anon_sym_DASH] = ACTIONS(38), + [anon_sym_PLUS] = ACTIONS(38), + [anon_sym_PIPE] = ACTIONS(38), + [anon_sym_CARET] = ACTIONS(38), + [anon_sym_STAR] = ACTIONS(38), + [anon_sym_SLASH] = ACTIONS(38), + [anon_sym_PERCENT] = ACTIONS(38), + [anon_sym_TILDE_SLASH] = ACTIONS(38), + [anon_sym_CARET_SLASH] = ACTIONS(38), + [anon_sym_TILDE_PERCENT] = ACTIONS(38), + [anon_sym_CARET_PERCENT] = ACTIONS(38), + [anon_sym_SLASH_PERCENT] = ACTIONS(43), + [anon_sym_AMP] = ACTIONS(38), + [anon_sym_TILDE] = ACTIONS(38), + [anon_sym_DOT] = ACTIONS(43), + [anon_sym_LBRACK] = ACTIONS(43), + [anon_sym_int] = ACTIONS(38), + [anon_sym_cell] = ACTIONS(38), + [anon_sym_slice] = ACTIONS(38), + [anon_sym_builder] = ACTIONS(38), + [anon_sym_cont] = ACTIONS(38), + [anon_sym_tuple] = ACTIONS(38), + [sym_var_type] = ACTIONS(38), + [aux_sym_number_literal_token1] = ACTIONS(38), + [sym_string_literal] = ACTIONS(38), + [sym_number_string_literal] = ACTIONS(43), + [sym_slice_string_literal] = ACTIONS(43), + [sym_underscore] = ACTIONS(38), + [sym_comment] = ACTIONS(3), + }, + [STATE(4)] = { + [sym_method_call] = STATE(5), + [aux_sym__expr80_repeat1] = STATE(5), + [sym_identifier] = ACTIONS(45), + [anon_sym_SEMI] = ACTIONS(45), + [anon_sym_EQ] = ACTIONS(45), + [anon_sym_LPAREN] = ACTIONS(47), + [anon_sym_return] = ACTIONS(45), + [anon_sym_LBRACE] = ACTIONS(45), + [anon_sym_RBRACE] = ACTIONS(47), + [anon_sym_repeat] = ACTIONS(45), + [anon_sym_if] = ACTIONS(45), + [anon_sym_ifnot] = ACTIONS(45), + [anon_sym_do] = ACTIONS(45), + [anon_sym_while] = ACTIONS(45), + [anon_sym_try] = ACTIONS(45), + [anon_sym_PLUS_EQ] = ACTIONS(47), + [anon_sym_DASH_EQ] = ACTIONS(47), + [anon_sym_STAR_EQ] = ACTIONS(47), + [anon_sym_SLASH_EQ] = ACTIONS(47), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(47), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(47), + [anon_sym_PERCENT_EQ] = ACTIONS(47), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(47), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(47), + [anon_sym_LT_LT_EQ] = ACTIONS(47), + [anon_sym_GT_GT_EQ] = ACTIONS(47), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(47), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(47), + [anon_sym_AMP_EQ] = ACTIONS(47), + [anon_sym_PIPE_EQ] = ACTIONS(47), + [anon_sym_CARET_EQ] = ACTIONS(47), + [anon_sym_QMARK] = ACTIONS(47), + [anon_sym_EQ_EQ] = ACTIONS(47), + [anon_sym_LT] = ACTIONS(45), + [anon_sym_GT] = ACTIONS(45), + [anon_sym_LT_EQ] = ACTIONS(45), + [anon_sym_GT_EQ] = ACTIONS(47), + [anon_sym_BANG_EQ] = ACTIONS(47), + [anon_sym_LT_EQ_GT] = ACTIONS(47), + [anon_sym_LT_LT] = ACTIONS(45), + [anon_sym_GT_GT] = ACTIONS(45), + [anon_sym_TILDE_GT_GT] = ACTIONS(45), + [anon_sym_CARET_GT_GT] = ACTIONS(45), + [anon_sym_DASH] = ACTIONS(45), + [anon_sym_PLUS] = ACTIONS(45), + [anon_sym_PIPE] = ACTIONS(45), + [anon_sym_CARET] = ACTIONS(45), + [anon_sym_STAR] = ACTIONS(45), + [anon_sym_SLASH] = ACTIONS(45), + [anon_sym_PERCENT] = ACTIONS(45), + [anon_sym_TILDE_SLASH] = ACTIONS(45), + [anon_sym_CARET_SLASH] = ACTIONS(45), + [anon_sym_TILDE_PERCENT] = ACTIONS(45), + [anon_sym_CARET_PERCENT] = ACTIONS(45), + [anon_sym_SLASH_PERCENT] = ACTIONS(47), + [anon_sym_AMP] = ACTIONS(45), + [anon_sym_TILDE] = ACTIONS(45), + [anon_sym_DOT] = ACTIONS(49), + [anon_sym_LBRACK] = ACTIONS(47), + [anon_sym_int] = ACTIONS(45), + [anon_sym_cell] = ACTIONS(45), + [anon_sym_slice] = ACTIONS(45), + [anon_sym_builder] = ACTIONS(45), + [anon_sym_cont] = ACTIONS(45), + [anon_sym_tuple] = ACTIONS(45), + [sym_var_type] = ACTIONS(45), + [aux_sym_number_literal_token1] = ACTIONS(45), + [sym_string_literal] = ACTIONS(45), + [sym_number_string_literal] = ACTIONS(47), + [sym_slice_string_literal] = ACTIONS(47), + [sym_underscore] = ACTIONS(45), + [sym_comment] = ACTIONS(3), + }, + [STATE(5)] = { + [sym_method_call] = STATE(5), + [aux_sym__expr80_repeat1] = STATE(5), + [sym_identifier] = ACTIONS(51), + [anon_sym_SEMI] = ACTIONS(51), + [anon_sym_EQ] = ACTIONS(51), + [anon_sym_LPAREN] = ACTIONS(53), + [anon_sym_return] = ACTIONS(51), + [anon_sym_LBRACE] = ACTIONS(51), + [anon_sym_RBRACE] = ACTIONS(53), + [anon_sym_repeat] = ACTIONS(51), + [anon_sym_if] = ACTIONS(51), + [anon_sym_ifnot] = ACTIONS(51), + [anon_sym_do] = ACTIONS(51), + [anon_sym_while] = ACTIONS(51), + [anon_sym_try] = ACTIONS(51), + [anon_sym_PLUS_EQ] = ACTIONS(53), + [anon_sym_DASH_EQ] = ACTIONS(53), + [anon_sym_STAR_EQ] = ACTIONS(53), + [anon_sym_SLASH_EQ] = ACTIONS(53), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(53), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(53), + [anon_sym_PERCENT_EQ] = ACTIONS(53), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(53), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(53), + [anon_sym_LT_LT_EQ] = ACTIONS(53), + [anon_sym_GT_GT_EQ] = ACTIONS(53), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(53), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(53), + [anon_sym_AMP_EQ] = ACTIONS(53), + [anon_sym_PIPE_EQ] = ACTIONS(53), + [anon_sym_CARET_EQ] = ACTIONS(53), + [anon_sym_QMARK] = ACTIONS(53), + [anon_sym_EQ_EQ] = ACTIONS(53), + [anon_sym_LT] = ACTIONS(51), + [anon_sym_GT] = ACTIONS(51), + [anon_sym_LT_EQ] = ACTIONS(51), + [anon_sym_GT_EQ] = ACTIONS(53), + [anon_sym_BANG_EQ] = ACTIONS(53), + [anon_sym_LT_EQ_GT] = ACTIONS(53), + [anon_sym_LT_LT] = ACTIONS(51), + [anon_sym_GT_GT] = ACTIONS(51), + [anon_sym_TILDE_GT_GT] = ACTIONS(51), + [anon_sym_CARET_GT_GT] = ACTIONS(51), + [anon_sym_DASH] = ACTIONS(51), + [anon_sym_PLUS] = ACTIONS(51), + [anon_sym_PIPE] = ACTIONS(51), + [anon_sym_CARET] = ACTIONS(51), + [anon_sym_STAR] = ACTIONS(51), + [anon_sym_SLASH] = ACTIONS(51), + [anon_sym_PERCENT] = ACTIONS(51), + [anon_sym_TILDE_SLASH] = ACTIONS(51), + [anon_sym_CARET_SLASH] = ACTIONS(51), + [anon_sym_TILDE_PERCENT] = ACTIONS(51), + [anon_sym_CARET_PERCENT] = ACTIONS(51), + [anon_sym_SLASH_PERCENT] = ACTIONS(53), + [anon_sym_AMP] = ACTIONS(51), + [anon_sym_TILDE] = ACTIONS(55), + [anon_sym_DOT] = ACTIONS(58), + [anon_sym_LBRACK] = ACTIONS(53), + [anon_sym_int] = ACTIONS(51), + [anon_sym_cell] = ACTIONS(51), + [anon_sym_slice] = ACTIONS(51), + [anon_sym_builder] = ACTIONS(51), + [anon_sym_cont] = ACTIONS(51), + [anon_sym_tuple] = ACTIONS(51), + [sym_var_type] = ACTIONS(51), + [aux_sym_number_literal_token1] = ACTIONS(51), + [sym_string_literal] = ACTIONS(51), + [sym_number_string_literal] = ACTIONS(53), + [sym_slice_string_literal] = ACTIONS(53), + [sym_underscore] = ACTIONS(51), + [sym_comment] = ACTIONS(3), + }, + [STATE(6)] = { + [sym_method_call] = STATE(4), + [aux_sym__expr80_repeat1] = STATE(4), + [sym_identifier] = ACTIONS(61), + [anon_sym_SEMI] = ACTIONS(61), + [anon_sym_EQ] = ACTIONS(61), + [anon_sym_LPAREN] = ACTIONS(63), + [anon_sym_return] = ACTIONS(61), + [anon_sym_LBRACE] = ACTIONS(61), + [anon_sym_RBRACE] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(61), + [anon_sym_if] = ACTIONS(61), + [anon_sym_ifnot] = ACTIONS(61), + [anon_sym_do] = ACTIONS(61), + [anon_sym_while] = ACTIONS(61), + [anon_sym_try] = ACTIONS(61), + [anon_sym_PLUS_EQ] = ACTIONS(63), + [anon_sym_DASH_EQ] = ACTIONS(63), + [anon_sym_STAR_EQ] = ACTIONS(63), + [anon_sym_SLASH_EQ] = ACTIONS(63), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(63), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(63), + [anon_sym_PERCENT_EQ] = ACTIONS(63), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(63), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(63), + [anon_sym_LT_LT_EQ] = ACTIONS(63), + [anon_sym_GT_GT_EQ] = ACTIONS(63), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(63), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(63), + [anon_sym_AMP_EQ] = ACTIONS(63), + [anon_sym_PIPE_EQ] = ACTIONS(63), + [anon_sym_CARET_EQ] = ACTIONS(63), + [anon_sym_QMARK] = ACTIONS(63), + [anon_sym_EQ_EQ] = ACTIONS(63), + [anon_sym_LT] = ACTIONS(61), + [anon_sym_GT] = ACTIONS(61), + [anon_sym_LT_EQ] = ACTIONS(61), + [anon_sym_GT_EQ] = ACTIONS(63), + [anon_sym_BANG_EQ] = ACTIONS(63), + [anon_sym_LT_EQ_GT] = ACTIONS(63), + [anon_sym_LT_LT] = ACTIONS(61), + [anon_sym_GT_GT] = ACTIONS(61), + [anon_sym_TILDE_GT_GT] = ACTIONS(61), + [anon_sym_CARET_GT_GT] = ACTIONS(61), + [anon_sym_DASH] = ACTIONS(61), + [anon_sym_PLUS] = ACTIONS(61), + [anon_sym_PIPE] = ACTIONS(61), + [anon_sym_CARET] = ACTIONS(61), + [anon_sym_STAR] = ACTIONS(61), + [anon_sym_SLASH] = ACTIONS(61), + [anon_sym_PERCENT] = ACTIONS(61), + [anon_sym_TILDE_SLASH] = ACTIONS(61), + [anon_sym_CARET_SLASH] = ACTIONS(61), + [anon_sym_TILDE_PERCENT] = ACTIONS(61), + [anon_sym_CARET_PERCENT] = ACTIONS(61), + [anon_sym_SLASH_PERCENT] = ACTIONS(63), + [anon_sym_AMP] = ACTIONS(61), + [anon_sym_TILDE] = ACTIONS(61), + [anon_sym_DOT] = ACTIONS(49), + [anon_sym_LBRACK] = ACTIONS(63), + [anon_sym_int] = ACTIONS(61), + [anon_sym_cell] = ACTIONS(61), + [anon_sym_slice] = ACTIONS(61), + [anon_sym_builder] = ACTIONS(61), + [anon_sym_cont] = ACTIONS(61), + [anon_sym_tuple] = ACTIONS(61), + [sym_var_type] = ACTIONS(61), + [aux_sym_number_literal_token1] = ACTIONS(61), + [sym_string_literal] = ACTIONS(61), + [sym_number_string_literal] = ACTIONS(63), + [sym_slice_string_literal] = ACTIONS(63), + [sym_underscore] = ACTIONS(61), + [sym_comment] = ACTIONS(3), + }, + [STATE(7)] = { + [sym_identifier] = ACTIONS(65), + [anon_sym_SEMI] = ACTIONS(65), + [anon_sym_EQ] = ACTIONS(65), + [anon_sym_LPAREN] = ACTIONS(67), + [anon_sym_DASH_GT] = ACTIONS(69), + [anon_sym_return] = ACTIONS(65), + [anon_sym_LBRACE] = ACTIONS(65), + [anon_sym_RBRACE] = ACTIONS(67), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_if] = ACTIONS(65), + [anon_sym_ifnot] = ACTIONS(65), + [anon_sym_do] = ACTIONS(65), + [anon_sym_while] = ACTIONS(65), + [anon_sym_try] = ACTIONS(65), + [anon_sym_PLUS_EQ] = ACTIONS(67), + [anon_sym_DASH_EQ] = ACTIONS(67), + [anon_sym_STAR_EQ] = ACTIONS(67), + [anon_sym_SLASH_EQ] = ACTIONS(67), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(67), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(67), + [anon_sym_PERCENT_EQ] = ACTIONS(67), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(67), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(67), + [anon_sym_LT_LT_EQ] = ACTIONS(67), + [anon_sym_GT_GT_EQ] = ACTIONS(67), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(67), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(67), + [anon_sym_AMP_EQ] = ACTIONS(67), + [anon_sym_PIPE_EQ] = ACTIONS(67), + [anon_sym_CARET_EQ] = ACTIONS(67), + [anon_sym_QMARK] = ACTIONS(67), + [anon_sym_EQ_EQ] = ACTIONS(67), + [anon_sym_LT] = ACTIONS(65), + [anon_sym_GT] = ACTIONS(65), + [anon_sym_LT_EQ] = ACTIONS(65), + [anon_sym_GT_EQ] = ACTIONS(67), + [anon_sym_BANG_EQ] = ACTIONS(67), + [anon_sym_LT_EQ_GT] = ACTIONS(67), + [anon_sym_LT_LT] = ACTIONS(65), + [anon_sym_GT_GT] = ACTIONS(65), + [anon_sym_TILDE_GT_GT] = ACTIONS(65), + [anon_sym_CARET_GT_GT] = ACTIONS(65), + [anon_sym_DASH] = ACTIONS(65), + [anon_sym_PLUS] = ACTIONS(65), + [anon_sym_PIPE] = ACTIONS(65), + [anon_sym_CARET] = ACTIONS(65), + [anon_sym_STAR] = ACTIONS(65), + [anon_sym_SLASH] = ACTIONS(65), + [anon_sym_PERCENT] = ACTIONS(65), + [anon_sym_TILDE_SLASH] = ACTIONS(65), + [anon_sym_CARET_SLASH] = ACTIONS(65), + [anon_sym_TILDE_PERCENT] = ACTIONS(65), + [anon_sym_CARET_PERCENT] = ACTIONS(65), + [anon_sym_SLASH_PERCENT] = ACTIONS(67), + [anon_sym_AMP] = ACTIONS(65), + [anon_sym_TILDE] = ACTIONS(65), + [anon_sym_DOT] = ACTIONS(67), + [anon_sym_LBRACK] = ACTIONS(67), + [anon_sym_int] = ACTIONS(65), + [anon_sym_cell] = ACTIONS(65), + [anon_sym_slice] = ACTIONS(65), + [anon_sym_builder] = ACTIONS(65), + [anon_sym_cont] = ACTIONS(65), + [anon_sym_tuple] = ACTIONS(65), + [sym_var_type] = ACTIONS(65), + [aux_sym_number_literal_token1] = ACTIONS(65), + [sym_string_literal] = ACTIONS(65), + [sym_number_string_literal] = ACTIONS(67), + [sym_slice_string_literal] = ACTIONS(67), + [sym_underscore] = ACTIONS(65), + [sym_comment] = ACTIONS(3), + }, + [STATE(8)] = { + [sym_identifier] = ACTIONS(71), + [anon_sym_SEMI] = ACTIONS(74), + [anon_sym_EQ] = ACTIONS(74), + [anon_sym_LPAREN] = ACTIONS(76), + [anon_sym_DASH_GT] = ACTIONS(78), + [anon_sym_return] = ACTIONS(74), + [anon_sym_LBRACE] = ACTIONS(74), + [anon_sym_RBRACE] = ACTIONS(76), + [anon_sym_repeat] = ACTIONS(74), + [anon_sym_if] = ACTIONS(74), + [anon_sym_ifnot] = ACTIONS(74), + [anon_sym_do] = ACTIONS(74), + [anon_sym_while] = ACTIONS(74), + [anon_sym_try] = ACTIONS(74), + [anon_sym_PLUS_EQ] = ACTIONS(76), + [anon_sym_DASH_EQ] = ACTIONS(76), + [anon_sym_STAR_EQ] = ACTIONS(76), + [anon_sym_SLASH_EQ] = ACTIONS(76), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(76), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(76), + [anon_sym_PERCENT_EQ] = ACTIONS(76), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(76), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(76), + [anon_sym_LT_LT_EQ] = ACTIONS(76), + [anon_sym_GT_GT_EQ] = ACTIONS(76), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(76), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(76), + [anon_sym_AMP_EQ] = ACTIONS(76), + [anon_sym_PIPE_EQ] = ACTIONS(76), + [anon_sym_CARET_EQ] = ACTIONS(76), + [anon_sym_QMARK] = ACTIONS(76), + [anon_sym_EQ_EQ] = ACTIONS(76), + [anon_sym_LT] = ACTIONS(74), + [anon_sym_GT] = ACTIONS(74), + [anon_sym_LT_EQ] = ACTIONS(74), + [anon_sym_GT_EQ] = ACTIONS(76), + [anon_sym_BANG_EQ] = ACTIONS(76), + [anon_sym_LT_EQ_GT] = ACTIONS(76), + [anon_sym_LT_LT] = ACTIONS(74), + [anon_sym_GT_GT] = ACTIONS(74), + [anon_sym_TILDE_GT_GT] = ACTIONS(74), + [anon_sym_CARET_GT_GT] = ACTIONS(74), + [anon_sym_DASH] = ACTIONS(74), + [anon_sym_PLUS] = ACTIONS(74), + [anon_sym_PIPE] = ACTIONS(74), + [anon_sym_CARET] = ACTIONS(74), + [anon_sym_STAR] = ACTIONS(74), + [anon_sym_SLASH] = ACTIONS(74), + [anon_sym_PERCENT] = ACTIONS(74), + [anon_sym_TILDE_SLASH] = ACTIONS(74), + [anon_sym_CARET_SLASH] = ACTIONS(74), + [anon_sym_TILDE_PERCENT] = ACTIONS(74), + [anon_sym_CARET_PERCENT] = ACTIONS(74), + [anon_sym_SLASH_PERCENT] = ACTIONS(76), + [anon_sym_AMP] = ACTIONS(74), + [anon_sym_TILDE] = ACTIONS(74), + [anon_sym_DOT] = ACTIONS(76), + [anon_sym_LBRACK] = ACTIONS(76), + [anon_sym_int] = ACTIONS(74), + [anon_sym_cell] = ACTIONS(74), + [anon_sym_slice] = ACTIONS(74), + [anon_sym_builder] = ACTIONS(74), + [anon_sym_cont] = ACTIONS(74), + [anon_sym_tuple] = ACTIONS(74), + [sym_var_type] = ACTIONS(74), + [aux_sym_number_literal_token1] = ACTIONS(74), + [sym_string_literal] = ACTIONS(74), + [sym_number_string_literal] = ACTIONS(76), + [sym_slice_string_literal] = ACTIONS(76), + [sym_underscore] = ACTIONS(74), + [sym_comment] = ACTIONS(3), + }, + [STATE(9)] = { + [sym_identifier] = ACTIONS(65), + [anon_sym_SEMI] = ACTIONS(65), + [anon_sym_EQ] = ACTIONS(65), + [anon_sym_LPAREN] = ACTIONS(67), + [anon_sym_DASH_GT] = ACTIONS(80), + [anon_sym_return] = ACTIONS(65), + [anon_sym_LBRACE] = ACTIONS(65), + [anon_sym_RBRACE] = ACTIONS(67), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_if] = ACTIONS(65), + [anon_sym_ifnot] = ACTIONS(65), + [anon_sym_do] = ACTIONS(65), + [anon_sym_while] = ACTIONS(65), + [anon_sym_try] = ACTIONS(65), + [anon_sym_PLUS_EQ] = ACTIONS(67), + [anon_sym_DASH_EQ] = ACTIONS(67), + [anon_sym_STAR_EQ] = ACTIONS(67), + [anon_sym_SLASH_EQ] = ACTIONS(67), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(67), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(67), + [anon_sym_PERCENT_EQ] = ACTIONS(67), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(67), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(67), + [anon_sym_LT_LT_EQ] = ACTIONS(67), + [anon_sym_GT_GT_EQ] = ACTIONS(67), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(67), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(67), + [anon_sym_AMP_EQ] = ACTIONS(67), + [anon_sym_PIPE_EQ] = ACTIONS(67), + [anon_sym_CARET_EQ] = ACTIONS(67), + [anon_sym_QMARK] = ACTIONS(67), + [anon_sym_EQ_EQ] = ACTIONS(67), + [anon_sym_LT] = ACTIONS(65), + [anon_sym_GT] = ACTIONS(65), + [anon_sym_LT_EQ] = ACTIONS(65), + [anon_sym_GT_EQ] = ACTIONS(67), + [anon_sym_BANG_EQ] = ACTIONS(67), + [anon_sym_LT_EQ_GT] = ACTIONS(67), + [anon_sym_LT_LT] = ACTIONS(65), + [anon_sym_GT_GT] = ACTIONS(65), + [anon_sym_TILDE_GT_GT] = ACTIONS(65), + [anon_sym_CARET_GT_GT] = ACTIONS(65), + [anon_sym_DASH] = ACTIONS(65), + [anon_sym_PLUS] = ACTIONS(65), + [anon_sym_PIPE] = ACTIONS(65), + [anon_sym_CARET] = ACTIONS(65), + [anon_sym_STAR] = ACTIONS(65), + [anon_sym_SLASH] = ACTIONS(65), + [anon_sym_PERCENT] = ACTIONS(65), + [anon_sym_TILDE_SLASH] = ACTIONS(65), + [anon_sym_CARET_SLASH] = ACTIONS(65), + [anon_sym_TILDE_PERCENT] = ACTIONS(65), + [anon_sym_CARET_PERCENT] = ACTIONS(65), + [anon_sym_SLASH_PERCENT] = ACTIONS(67), + [anon_sym_AMP] = ACTIONS(65), + [anon_sym_TILDE] = ACTIONS(65), + [anon_sym_DOT] = ACTIONS(67), + [anon_sym_LBRACK] = ACTIONS(67), + [anon_sym_int] = ACTIONS(65), + [anon_sym_cell] = ACTIONS(65), + [anon_sym_slice] = ACTIONS(65), + [anon_sym_builder] = ACTIONS(65), + [anon_sym_cont] = ACTIONS(65), + [anon_sym_tuple] = ACTIONS(65), + [sym_var_type] = ACTIONS(65), + [aux_sym_number_literal_token1] = ACTIONS(65), + [sym_string_literal] = ACTIONS(65), + [sym_number_string_literal] = ACTIONS(67), + [sym_slice_string_literal] = ACTIONS(67), + [sym_underscore] = ACTIONS(65), + [sym_comment] = ACTIONS(3), + }, + [STATE(10)] = { + [sym_identifier] = ACTIONS(82), + [anon_sym_SEMI] = ACTIONS(85), + [anon_sym_EQ] = ACTIONS(85), + [anon_sym_LPAREN] = ACTIONS(87), + [anon_sym_DASH_GT] = ACTIONS(89), + [anon_sym_return] = ACTIONS(85), + [anon_sym_LBRACE] = ACTIONS(85), + [anon_sym_RBRACE] = ACTIONS(87), + [anon_sym_repeat] = ACTIONS(85), + [anon_sym_if] = ACTIONS(85), + [anon_sym_ifnot] = ACTIONS(85), + [anon_sym_do] = ACTIONS(85), + [anon_sym_while] = ACTIONS(85), + [anon_sym_try] = ACTIONS(85), + [anon_sym_PLUS_EQ] = ACTIONS(87), + [anon_sym_DASH_EQ] = ACTIONS(87), + [anon_sym_STAR_EQ] = ACTIONS(87), + [anon_sym_SLASH_EQ] = ACTIONS(87), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(87), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(87), + [anon_sym_PERCENT_EQ] = ACTIONS(87), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(87), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(87), + [anon_sym_LT_LT_EQ] = ACTIONS(87), + [anon_sym_GT_GT_EQ] = ACTIONS(87), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(87), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(87), + [anon_sym_AMP_EQ] = ACTIONS(87), + [anon_sym_PIPE_EQ] = ACTIONS(87), + [anon_sym_CARET_EQ] = ACTIONS(87), + [anon_sym_QMARK] = ACTIONS(87), + [anon_sym_EQ_EQ] = ACTIONS(87), + [anon_sym_LT] = ACTIONS(85), + [anon_sym_GT] = ACTIONS(85), + [anon_sym_LT_EQ] = ACTIONS(85), + [anon_sym_GT_EQ] = ACTIONS(87), + [anon_sym_BANG_EQ] = ACTIONS(87), + [anon_sym_LT_EQ_GT] = ACTIONS(87), + [anon_sym_LT_LT] = ACTIONS(85), + [anon_sym_GT_GT] = ACTIONS(85), + [anon_sym_TILDE_GT_GT] = ACTIONS(85), + [anon_sym_CARET_GT_GT] = ACTIONS(85), + [anon_sym_DASH] = ACTIONS(85), + [anon_sym_PLUS] = ACTIONS(85), + [anon_sym_PIPE] = ACTIONS(85), + [anon_sym_CARET] = ACTIONS(85), + [anon_sym_STAR] = ACTIONS(85), + [anon_sym_SLASH] = ACTIONS(85), + [anon_sym_PERCENT] = ACTIONS(85), + [anon_sym_TILDE_SLASH] = ACTIONS(85), + [anon_sym_CARET_SLASH] = ACTIONS(85), + [anon_sym_TILDE_PERCENT] = ACTIONS(85), + [anon_sym_CARET_PERCENT] = ACTIONS(85), + [anon_sym_SLASH_PERCENT] = ACTIONS(87), + [anon_sym_AMP] = ACTIONS(85), + [anon_sym_TILDE] = ACTIONS(85), + [anon_sym_DOT] = ACTIONS(87), + [anon_sym_LBRACK] = ACTIONS(87), + [anon_sym_int] = ACTIONS(85), + [anon_sym_cell] = ACTIONS(85), + [anon_sym_slice] = ACTIONS(85), + [anon_sym_builder] = ACTIONS(85), + [anon_sym_cont] = ACTIONS(85), + [anon_sym_tuple] = ACTIONS(85), + [sym_var_type] = ACTIONS(85), + [aux_sym_number_literal_token1] = ACTIONS(85), + [sym_string_literal] = ACTIONS(85), + [sym_number_string_literal] = ACTIONS(87), + [sym_slice_string_literal] = ACTIONS(87), + [sym_underscore] = ACTIONS(85), + [sym_comment] = ACTIONS(3), + }, + [STATE(11)] = { + [sym__statement] = STATE(35), + [sym_return_statement] = STATE(35), + [sym_block_statement] = STATE(35), + [sym_expression_statement] = STATE(35), + [sym_empty_statement] = STATE(35), + [sym_repeat_statement] = STATE(35), + [sym_if_statement] = STATE(35), + [sym_do_while_statement] = STATE(35), + [sym_while_statement] = STATE(35), + [sym_try_catch_statement] = STATE(35), + [sym__expression] = STATE(179), + [sym__expr10] = STATE(179), + [sym__expr13] = STATE(139), + [sym__expr15] = STATE(136), + [sym__expr17] = STATE(75), + [sym__expr20] = STATE(47), + [sym__expr30] = STATE(40), + [sym__expr75] = STATE(15), + [sym__expr80] = STATE(15), + [sym__expr90] = STATE(6), + [sym_function_application] = STATE(6), + [sym_local_vars_declaration] = STATE(6), + [sym_tuple_vars_declaration] = STATE(16), + [sym_tensor_vars_declaration] = STATE(16), + [sym_var_declaration] = STATE(16), + [sym__var_declaration_lhs] = STATE(16), + [sym__nontype_expr100] = STATE(6), + [sym__expr100] = STATE(6), + [sym_parenthesized_expression] = STATE(6), + [sym_tensor_expression] = STATE(6), + [sym_typed_tuple] = STATE(6), + [sym__type_hint] = STATE(387), + [sym_function_type] = STATE(387), + [sym__atomic_type] = STATE(260), + [sym__parenthesized_type] = STATE(260), + [sym_primitive_type] = STATE(260), + [sym_tensor_type] = STATE(260), + [sym_tuple_type] = STATE(260), + [sym_hole_type] = STATE(260), + [sym_type_identifier] = STATE(260), + [sym_number_literal] = STATE(6), + [aux_sym_block_statement_repeat1] = STATE(35), + [sym_identifier] = ACTIONS(91), + [anon_sym_SEMI] = ACTIONS(93), + [anon_sym_LPAREN] = ACTIONS(95), + [anon_sym_return] = ACTIONS(97), + [anon_sym_LBRACE] = ACTIONS(99), + [anon_sym_RBRACE] = ACTIONS(101), + [anon_sym_repeat] = ACTIONS(103), + [anon_sym_if] = ACTIONS(105), + [anon_sym_ifnot] = ACTIONS(105), + [anon_sym_do] = ACTIONS(107), + [anon_sym_while] = ACTIONS(109), + [anon_sym_try] = ACTIONS(111), + [anon_sym_DASH] = ACTIONS(113), + [anon_sym_TILDE] = ACTIONS(115), + [anon_sym_LBRACK] = ACTIONS(117), + [anon_sym_int] = ACTIONS(25), + [anon_sym_cell] = ACTIONS(25), + [anon_sym_slice] = ACTIONS(25), + [anon_sym_builder] = ACTIONS(25), + [anon_sym_cont] = ACTIONS(25), + [anon_sym_tuple] = ACTIONS(25), + [sym_var_type] = ACTIONS(27), + [aux_sym_number_literal_token1] = ACTIONS(119), + [sym_string_literal] = ACTIONS(121), + [sym_number_string_literal] = ACTIONS(123), + [sym_slice_string_literal] = ACTIONS(125), + [sym_underscore] = ACTIONS(127), + [sym_comment] = ACTIONS(3), + }, + [STATE(12)] = { + [sym__statement] = STATE(13), + [sym_return_statement] = STATE(13), + [sym_block_statement] = STATE(13), + [sym_expression_statement] = STATE(13), + [sym_empty_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_do_while_statement] = STATE(13), + [sym_while_statement] = STATE(13), + [sym_try_catch_statement] = STATE(13), + [sym__expression] = STATE(179), + [sym__expr10] = STATE(179), + [sym__expr13] = STATE(139), + [sym__expr15] = STATE(136), + [sym__expr17] = STATE(75), + [sym__expr20] = STATE(47), + [sym__expr30] = STATE(40), + [sym__expr75] = STATE(15), + [sym__expr80] = STATE(15), + [sym__expr90] = STATE(6), + [sym_function_application] = STATE(6), + [sym_local_vars_declaration] = STATE(6), + [sym_tuple_vars_declaration] = STATE(16), + [sym_tensor_vars_declaration] = STATE(16), + [sym_var_declaration] = STATE(16), + [sym__var_declaration_lhs] = STATE(16), + [sym__nontype_expr100] = STATE(6), + [sym__expr100] = STATE(6), + [sym_parenthesized_expression] = STATE(6), + [sym_tensor_expression] = STATE(6), + [sym_typed_tuple] = STATE(6), + [sym__type_hint] = STATE(387), + [sym_function_type] = STATE(387), + [sym__atomic_type] = STATE(260), + [sym__parenthesized_type] = STATE(260), + [sym_primitive_type] = STATE(260), + [sym_tensor_type] = STATE(260), + [sym_tuple_type] = STATE(260), + [sym_hole_type] = STATE(260), + [sym_type_identifier] = STATE(260), + [sym_number_literal] = STATE(6), + [aux_sym_block_statement_repeat1] = STATE(13), + [sym_identifier] = ACTIONS(91), + [anon_sym_SEMI] = ACTIONS(93), + [anon_sym_LPAREN] = ACTIONS(95), + [anon_sym_return] = ACTIONS(97), + [anon_sym_LBRACE] = ACTIONS(99), + [anon_sym_RBRACE] = ACTIONS(129), + [anon_sym_repeat] = ACTIONS(103), + [anon_sym_if] = ACTIONS(105), + [anon_sym_ifnot] = ACTIONS(105), + [anon_sym_do] = ACTIONS(107), + [anon_sym_while] = ACTIONS(109), + [anon_sym_try] = ACTIONS(111), + [anon_sym_DASH] = ACTIONS(113), + [anon_sym_TILDE] = ACTIONS(115), + [anon_sym_LBRACK] = ACTIONS(117), + [anon_sym_int] = ACTIONS(25), + [anon_sym_cell] = ACTIONS(25), + [anon_sym_slice] = ACTIONS(25), + [anon_sym_builder] = ACTIONS(25), + [anon_sym_cont] = ACTIONS(25), + [anon_sym_tuple] = ACTIONS(25), + [sym_var_type] = ACTIONS(27), + [aux_sym_number_literal_token1] = ACTIONS(119), + [sym_string_literal] = ACTIONS(121), + [sym_number_string_literal] = ACTIONS(123), + [sym_slice_string_literal] = ACTIONS(125), + [sym_underscore] = ACTIONS(127), + [sym_comment] = ACTIONS(3), + }, + [STATE(13)] = { + [sym__statement] = STATE(13), + [sym_return_statement] = STATE(13), + [sym_block_statement] = STATE(13), + [sym_expression_statement] = STATE(13), + [sym_empty_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_do_while_statement] = STATE(13), + [sym_while_statement] = STATE(13), + [sym_try_catch_statement] = STATE(13), + [sym__expression] = STATE(179), + [sym__expr10] = STATE(179), + [sym__expr13] = STATE(139), + [sym__expr15] = STATE(136), + [sym__expr17] = STATE(75), + [sym__expr20] = STATE(47), + [sym__expr30] = STATE(40), + [sym__expr75] = STATE(15), + [sym__expr80] = STATE(15), + [sym__expr90] = STATE(6), + [sym_function_application] = STATE(6), + [sym_local_vars_declaration] = STATE(6), + [sym_tuple_vars_declaration] = STATE(16), + [sym_tensor_vars_declaration] = STATE(16), + [sym_var_declaration] = STATE(16), + [sym__var_declaration_lhs] = STATE(16), + [sym__nontype_expr100] = STATE(6), + [sym__expr100] = STATE(6), + [sym_parenthesized_expression] = STATE(6), + [sym_tensor_expression] = STATE(6), + [sym_typed_tuple] = STATE(6), + [sym__type_hint] = STATE(387), + [sym_function_type] = STATE(387), + [sym__atomic_type] = STATE(260), + [sym__parenthesized_type] = STATE(260), + [sym_primitive_type] = STATE(260), + [sym_tensor_type] = STATE(260), + [sym_tuple_type] = STATE(260), + [sym_hole_type] = STATE(260), + [sym_type_identifier] = STATE(260), + [sym_number_literal] = STATE(6), + [aux_sym_block_statement_repeat1] = STATE(13), + [sym_identifier] = ACTIONS(131), + [anon_sym_SEMI] = ACTIONS(134), + [anon_sym_LPAREN] = ACTIONS(137), + [anon_sym_return] = ACTIONS(140), + [anon_sym_LBRACE] = ACTIONS(143), + [anon_sym_RBRACE] = ACTIONS(146), + [anon_sym_repeat] = ACTIONS(148), + [anon_sym_if] = ACTIONS(151), + [anon_sym_ifnot] = ACTIONS(151), + [anon_sym_do] = ACTIONS(154), + [anon_sym_while] = ACTIONS(157), + [anon_sym_try] = ACTIONS(160), + [anon_sym_DASH] = ACTIONS(163), + [anon_sym_TILDE] = ACTIONS(166), + [anon_sym_LBRACK] = ACTIONS(169), + [anon_sym_int] = ACTIONS(172), + [anon_sym_cell] = ACTIONS(172), + [anon_sym_slice] = ACTIONS(172), + [anon_sym_builder] = ACTIONS(172), + [anon_sym_cont] = ACTIONS(172), + [anon_sym_tuple] = ACTIONS(172), + [sym_var_type] = ACTIONS(175), + [aux_sym_number_literal_token1] = ACTIONS(178), + [sym_string_literal] = ACTIONS(181), + [sym_number_string_literal] = ACTIONS(184), + [sym_slice_string_literal] = ACTIONS(187), + [sym_underscore] = ACTIONS(190), + [sym_comment] = ACTIONS(3), + }, + [STATE(14)] = { + [sym_identifier] = ACTIONS(193), + [anon_sym_SEMI] = ACTIONS(193), + [anon_sym_EQ] = ACTIONS(193), + [anon_sym_LPAREN] = ACTIONS(195), + [anon_sym_return] = ACTIONS(193), + [anon_sym_LBRACE] = ACTIONS(193), + [anon_sym_RBRACE] = ACTIONS(195), + [anon_sym_repeat] = ACTIONS(193), + [anon_sym_if] = ACTIONS(193), + [anon_sym_ifnot] = ACTIONS(193), + [anon_sym_do] = ACTIONS(193), + [anon_sym_while] = ACTIONS(193), + [anon_sym_try] = ACTIONS(193), + [anon_sym_PLUS_EQ] = ACTIONS(195), + [anon_sym_DASH_EQ] = ACTIONS(195), + [anon_sym_STAR_EQ] = ACTIONS(195), + [anon_sym_SLASH_EQ] = ACTIONS(195), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(195), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(195), + [anon_sym_PERCENT_EQ] = ACTIONS(195), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(195), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(195), + [anon_sym_LT_LT_EQ] = ACTIONS(195), + [anon_sym_GT_GT_EQ] = ACTIONS(195), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(195), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(195), + [anon_sym_AMP_EQ] = ACTIONS(195), + [anon_sym_PIPE_EQ] = ACTIONS(195), + [anon_sym_CARET_EQ] = ACTIONS(195), + [anon_sym_QMARK] = ACTIONS(195), + [anon_sym_EQ_EQ] = ACTIONS(195), + [anon_sym_LT] = ACTIONS(193), + [anon_sym_GT] = ACTIONS(193), + [anon_sym_LT_EQ] = ACTIONS(193), + [anon_sym_GT_EQ] = ACTIONS(195), + [anon_sym_BANG_EQ] = ACTIONS(195), + [anon_sym_LT_EQ_GT] = ACTIONS(195), + [anon_sym_LT_LT] = ACTIONS(193), + [anon_sym_GT_GT] = ACTIONS(193), + [anon_sym_TILDE_GT_GT] = ACTIONS(193), + [anon_sym_CARET_GT_GT] = ACTIONS(193), + [anon_sym_DASH] = ACTIONS(193), + [anon_sym_PLUS] = ACTIONS(193), + [anon_sym_PIPE] = ACTIONS(193), + [anon_sym_CARET] = ACTIONS(193), + [anon_sym_STAR] = ACTIONS(193), + [anon_sym_SLASH] = ACTIONS(193), + [anon_sym_PERCENT] = ACTIONS(193), + [anon_sym_TILDE_SLASH] = ACTIONS(193), + [anon_sym_CARET_SLASH] = ACTIONS(193), + [anon_sym_TILDE_PERCENT] = ACTIONS(193), + [anon_sym_CARET_PERCENT] = ACTIONS(193), + [anon_sym_SLASH_PERCENT] = ACTIONS(195), + [anon_sym_AMP] = ACTIONS(193), + [anon_sym_TILDE] = ACTIONS(193), + [anon_sym_DOT] = ACTIONS(195), + [anon_sym_LBRACK] = ACTIONS(195), + [anon_sym_int] = ACTIONS(193), + [anon_sym_cell] = ACTIONS(193), + [anon_sym_slice] = ACTIONS(193), + [anon_sym_builder] = ACTIONS(193), + [anon_sym_cont] = ACTIONS(193), + [anon_sym_tuple] = ACTIONS(193), + [sym_var_type] = ACTIONS(193), + [aux_sym_number_literal_token1] = ACTIONS(193), + [sym_string_literal] = ACTIONS(193), + [sym_number_string_literal] = ACTIONS(195), + [sym_slice_string_literal] = ACTIONS(195), + [sym_underscore] = ACTIONS(193), + [sym_comment] = ACTIONS(3), + }, + [STATE(15)] = { + [aux_sym__expr30_repeat1] = STATE(17), + [sym_identifier] = ACTIONS(197), + [anon_sym_SEMI] = ACTIONS(197), + [anon_sym_EQ] = ACTIONS(197), + [anon_sym_LPAREN] = ACTIONS(199), + [anon_sym_return] = ACTIONS(197), + [anon_sym_LBRACE] = ACTIONS(197), + [anon_sym_RBRACE] = ACTIONS(199), + [anon_sym_repeat] = ACTIONS(197), + [anon_sym_if] = ACTIONS(197), + [anon_sym_ifnot] = ACTIONS(197), + [anon_sym_do] = ACTIONS(197), + [anon_sym_while] = ACTIONS(197), + [anon_sym_try] = ACTIONS(197), + [anon_sym_PLUS_EQ] = ACTIONS(199), + [anon_sym_DASH_EQ] = ACTIONS(199), + [anon_sym_STAR_EQ] = ACTIONS(199), + [anon_sym_SLASH_EQ] = ACTIONS(199), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(199), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(199), + [anon_sym_PERCENT_EQ] = ACTIONS(199), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(199), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(199), + [anon_sym_LT_LT_EQ] = ACTIONS(199), + [anon_sym_GT_GT_EQ] = ACTIONS(199), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(199), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(199), + [anon_sym_AMP_EQ] = ACTIONS(199), + [anon_sym_PIPE_EQ] = ACTIONS(199), + [anon_sym_CARET_EQ] = ACTIONS(199), + [anon_sym_QMARK] = ACTIONS(199), + [anon_sym_EQ_EQ] = ACTIONS(199), + [anon_sym_LT] = ACTIONS(197), + [anon_sym_GT] = ACTIONS(197), + [anon_sym_LT_EQ] = ACTIONS(197), + [anon_sym_GT_EQ] = ACTIONS(199), + [anon_sym_BANG_EQ] = ACTIONS(199), + [anon_sym_LT_EQ_GT] = ACTIONS(199), + [anon_sym_LT_LT] = ACTIONS(197), + [anon_sym_GT_GT] = ACTIONS(197), + [anon_sym_TILDE_GT_GT] = ACTIONS(197), + [anon_sym_CARET_GT_GT] = ACTIONS(197), + [anon_sym_DASH] = ACTIONS(197), + [anon_sym_PLUS] = ACTIONS(197), + [anon_sym_PIPE] = ACTIONS(197), + [anon_sym_CARET] = ACTIONS(197), + [anon_sym_STAR] = ACTIONS(201), + [anon_sym_SLASH] = ACTIONS(201), + [anon_sym_PERCENT] = ACTIONS(201), + [anon_sym_TILDE_SLASH] = ACTIONS(201), + [anon_sym_CARET_SLASH] = ACTIONS(201), + [anon_sym_TILDE_PERCENT] = ACTIONS(201), + [anon_sym_CARET_PERCENT] = ACTIONS(201), + [anon_sym_SLASH_PERCENT] = ACTIONS(203), + [anon_sym_AMP] = ACTIONS(201), + [anon_sym_TILDE] = ACTIONS(197), + [anon_sym_LBRACK] = ACTIONS(199), + [anon_sym_int] = ACTIONS(197), + [anon_sym_cell] = ACTIONS(197), + [anon_sym_slice] = ACTIONS(197), + [anon_sym_builder] = ACTIONS(197), + [anon_sym_cont] = ACTIONS(197), + [anon_sym_tuple] = ACTIONS(197), + [sym_var_type] = ACTIONS(197), + [aux_sym_number_literal_token1] = ACTIONS(197), + [sym_string_literal] = ACTIONS(197), + [sym_number_string_literal] = ACTIONS(199), + [sym_slice_string_literal] = ACTIONS(199), + [sym_underscore] = ACTIONS(197), + [sym_comment] = ACTIONS(3), + }, + [STATE(16)] = { + [sym_identifier] = ACTIONS(205), + [anon_sym_SEMI] = ACTIONS(205), + [anon_sym_EQ] = ACTIONS(205), + [anon_sym_LPAREN] = ACTIONS(207), + [anon_sym_return] = ACTIONS(205), + [anon_sym_LBRACE] = ACTIONS(205), + [anon_sym_RBRACE] = ACTIONS(207), + [anon_sym_repeat] = ACTIONS(205), + [anon_sym_if] = ACTIONS(205), + [anon_sym_ifnot] = ACTIONS(205), + [anon_sym_do] = ACTIONS(205), + [anon_sym_while] = ACTIONS(205), + [anon_sym_try] = ACTIONS(205), + [anon_sym_PLUS_EQ] = ACTIONS(207), + [anon_sym_DASH_EQ] = ACTIONS(207), + [anon_sym_STAR_EQ] = ACTIONS(207), + [anon_sym_SLASH_EQ] = ACTIONS(207), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(207), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(207), + [anon_sym_PERCENT_EQ] = ACTIONS(207), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(207), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(207), + [anon_sym_LT_LT_EQ] = ACTIONS(207), + [anon_sym_GT_GT_EQ] = ACTIONS(207), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(207), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(207), + [anon_sym_AMP_EQ] = ACTIONS(207), + [anon_sym_PIPE_EQ] = ACTIONS(207), + [anon_sym_CARET_EQ] = ACTIONS(207), + [anon_sym_QMARK] = ACTIONS(207), + [anon_sym_EQ_EQ] = ACTIONS(207), + [anon_sym_LT] = ACTIONS(205), + [anon_sym_GT] = ACTIONS(205), + [anon_sym_LT_EQ] = ACTIONS(205), + [anon_sym_GT_EQ] = ACTIONS(207), + [anon_sym_BANG_EQ] = ACTIONS(207), + [anon_sym_LT_EQ_GT] = ACTIONS(207), + [anon_sym_LT_LT] = ACTIONS(205), + [anon_sym_GT_GT] = ACTIONS(205), + [anon_sym_TILDE_GT_GT] = ACTIONS(205), + [anon_sym_CARET_GT_GT] = ACTIONS(205), + [anon_sym_DASH] = ACTIONS(205), + [anon_sym_PLUS] = ACTIONS(205), + [anon_sym_PIPE] = ACTIONS(205), + [anon_sym_CARET] = ACTIONS(205), + [anon_sym_STAR] = ACTIONS(205), + [anon_sym_SLASH] = ACTIONS(205), + [anon_sym_PERCENT] = ACTIONS(205), + [anon_sym_TILDE_SLASH] = ACTIONS(205), + [anon_sym_CARET_SLASH] = ACTIONS(205), + [anon_sym_TILDE_PERCENT] = ACTIONS(205), + [anon_sym_CARET_PERCENT] = ACTIONS(205), + [anon_sym_SLASH_PERCENT] = ACTIONS(207), + [anon_sym_AMP] = ACTIONS(205), + [anon_sym_TILDE] = ACTIONS(205), + [anon_sym_DOT] = ACTIONS(207), + [anon_sym_LBRACK] = ACTIONS(207), + [anon_sym_int] = ACTIONS(205), + [anon_sym_cell] = ACTIONS(205), + [anon_sym_slice] = ACTIONS(205), + [anon_sym_builder] = ACTIONS(205), + [anon_sym_cont] = ACTIONS(205), + [anon_sym_tuple] = ACTIONS(205), + [sym_var_type] = ACTIONS(205), + [aux_sym_number_literal_token1] = ACTIONS(205), + [sym_string_literal] = ACTIONS(205), + [sym_number_string_literal] = ACTIONS(207), + [sym_slice_string_literal] = ACTIONS(207), + [sym_underscore] = ACTIONS(205), + [sym_comment] = ACTIONS(3), + }, + [STATE(17)] = { + [aux_sym__expr30_repeat1] = STATE(23), + [sym_identifier] = ACTIONS(209), + [anon_sym_SEMI] = ACTIONS(209), + [anon_sym_EQ] = ACTIONS(209), + [anon_sym_LPAREN] = ACTIONS(211), + [anon_sym_return] = ACTIONS(209), + [anon_sym_LBRACE] = ACTIONS(209), + [anon_sym_RBRACE] = ACTIONS(211), + [anon_sym_repeat] = ACTIONS(209), + [anon_sym_if] = ACTIONS(209), + [anon_sym_ifnot] = ACTIONS(209), + [anon_sym_do] = ACTIONS(209), + [anon_sym_while] = ACTIONS(209), + [anon_sym_try] = ACTIONS(209), + [anon_sym_PLUS_EQ] = ACTIONS(211), + [anon_sym_DASH_EQ] = ACTIONS(211), + [anon_sym_STAR_EQ] = ACTIONS(211), + [anon_sym_SLASH_EQ] = ACTIONS(211), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(211), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(211), + [anon_sym_PERCENT_EQ] = ACTIONS(211), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(211), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(211), + [anon_sym_LT_LT_EQ] = ACTIONS(211), + [anon_sym_GT_GT_EQ] = ACTIONS(211), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(211), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(211), + [anon_sym_AMP_EQ] = ACTIONS(211), + [anon_sym_PIPE_EQ] = ACTIONS(211), + [anon_sym_CARET_EQ] = ACTIONS(211), + [anon_sym_QMARK] = ACTIONS(211), + [anon_sym_EQ_EQ] = ACTIONS(211), + [anon_sym_LT] = ACTIONS(209), + [anon_sym_GT] = ACTIONS(209), + [anon_sym_LT_EQ] = ACTIONS(209), + [anon_sym_GT_EQ] = ACTIONS(211), + [anon_sym_BANG_EQ] = ACTIONS(211), + [anon_sym_LT_EQ_GT] = ACTIONS(211), + [anon_sym_LT_LT] = ACTIONS(209), + [anon_sym_GT_GT] = ACTIONS(209), + [anon_sym_TILDE_GT_GT] = ACTIONS(209), + [anon_sym_CARET_GT_GT] = ACTIONS(209), + [anon_sym_DASH] = ACTIONS(209), + [anon_sym_PLUS] = ACTIONS(209), + [anon_sym_PIPE] = ACTIONS(209), + [anon_sym_CARET] = ACTIONS(209), + [anon_sym_STAR] = ACTIONS(201), + [anon_sym_SLASH] = ACTIONS(201), + [anon_sym_PERCENT] = ACTIONS(201), + [anon_sym_TILDE_SLASH] = ACTIONS(201), + [anon_sym_CARET_SLASH] = ACTIONS(201), + [anon_sym_TILDE_PERCENT] = ACTIONS(201), + [anon_sym_CARET_PERCENT] = ACTIONS(201), + [anon_sym_SLASH_PERCENT] = ACTIONS(203), + [anon_sym_AMP] = ACTIONS(201), + [anon_sym_TILDE] = ACTIONS(209), + [anon_sym_LBRACK] = ACTIONS(211), + [anon_sym_int] = ACTIONS(209), + [anon_sym_cell] = ACTIONS(209), + [anon_sym_slice] = ACTIONS(209), + [anon_sym_builder] = ACTIONS(209), + [anon_sym_cont] = ACTIONS(209), + [anon_sym_tuple] = ACTIONS(209), + [sym_var_type] = ACTIONS(209), + [aux_sym_number_literal_token1] = ACTIONS(209), + [sym_string_literal] = ACTIONS(209), + [sym_number_string_literal] = ACTIONS(211), + [sym_slice_string_literal] = ACTIONS(211), + [sym_underscore] = ACTIONS(209), + [sym_comment] = ACTIONS(3), + }, + [STATE(18)] = { + [sym_identifier] = ACTIONS(213), + [anon_sym_SEMI] = ACTIONS(213), + [anon_sym_EQ] = ACTIONS(213), + [anon_sym_LPAREN] = ACTIONS(215), + [anon_sym_return] = ACTIONS(213), + [anon_sym_LBRACE] = ACTIONS(213), + [anon_sym_RBRACE] = ACTIONS(215), + [anon_sym_repeat] = ACTIONS(213), + [anon_sym_if] = ACTIONS(213), + [anon_sym_ifnot] = ACTIONS(213), + [anon_sym_do] = ACTIONS(213), + [anon_sym_while] = ACTIONS(213), + [anon_sym_try] = ACTIONS(213), + [anon_sym_PLUS_EQ] = ACTIONS(215), + [anon_sym_DASH_EQ] = ACTIONS(215), + [anon_sym_STAR_EQ] = ACTIONS(215), + [anon_sym_SLASH_EQ] = ACTIONS(215), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(215), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(215), + [anon_sym_PERCENT_EQ] = ACTIONS(215), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(215), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(215), + [anon_sym_LT_LT_EQ] = ACTIONS(215), + [anon_sym_GT_GT_EQ] = ACTIONS(215), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(215), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(215), + [anon_sym_AMP_EQ] = ACTIONS(215), + [anon_sym_PIPE_EQ] = ACTIONS(215), + [anon_sym_CARET_EQ] = ACTIONS(215), + [anon_sym_QMARK] = ACTIONS(215), + [anon_sym_EQ_EQ] = ACTIONS(215), + [anon_sym_LT] = ACTIONS(213), + [anon_sym_GT] = ACTIONS(213), + [anon_sym_LT_EQ] = ACTIONS(213), + [anon_sym_GT_EQ] = ACTIONS(215), + [anon_sym_BANG_EQ] = ACTIONS(215), + [anon_sym_LT_EQ_GT] = ACTIONS(215), + [anon_sym_LT_LT] = ACTIONS(213), + [anon_sym_GT_GT] = ACTIONS(213), + [anon_sym_TILDE_GT_GT] = ACTIONS(213), + [anon_sym_CARET_GT_GT] = ACTIONS(213), + [anon_sym_DASH] = ACTIONS(213), + [anon_sym_PLUS] = ACTIONS(213), + [anon_sym_PIPE] = ACTIONS(213), + [anon_sym_CARET] = ACTIONS(213), + [anon_sym_STAR] = ACTIONS(213), + [anon_sym_SLASH] = ACTIONS(213), + [anon_sym_PERCENT] = ACTIONS(213), + [anon_sym_TILDE_SLASH] = ACTIONS(213), + [anon_sym_CARET_SLASH] = ACTIONS(213), + [anon_sym_TILDE_PERCENT] = ACTIONS(213), + [anon_sym_CARET_PERCENT] = ACTIONS(213), + [anon_sym_SLASH_PERCENT] = ACTIONS(215), + [anon_sym_AMP] = ACTIONS(213), + [anon_sym_TILDE] = ACTIONS(213), + [anon_sym_DOT] = ACTIONS(215), + [anon_sym_LBRACK] = ACTIONS(215), + [anon_sym_int] = ACTIONS(213), + [anon_sym_cell] = ACTIONS(213), + [anon_sym_slice] = ACTIONS(213), + [anon_sym_builder] = ACTIONS(213), + [anon_sym_cont] = ACTIONS(213), + [anon_sym_tuple] = ACTIONS(213), + [sym_var_type] = ACTIONS(213), + [aux_sym_number_literal_token1] = ACTIONS(213), + [sym_string_literal] = ACTIONS(213), + [sym_number_string_literal] = ACTIONS(215), + [sym_slice_string_literal] = ACTIONS(215), + [sym_underscore] = ACTIONS(213), + [sym_comment] = ACTIONS(3), + }, + [STATE(19)] = { + [sym_identifier] = ACTIONS(217), + [anon_sym_SEMI] = ACTIONS(217), + [anon_sym_EQ] = ACTIONS(217), + [anon_sym_LPAREN] = ACTIONS(219), + [anon_sym_return] = ACTIONS(217), + [anon_sym_LBRACE] = ACTIONS(217), + [anon_sym_RBRACE] = ACTIONS(219), + [anon_sym_repeat] = ACTIONS(217), + [anon_sym_if] = ACTIONS(217), + [anon_sym_ifnot] = ACTIONS(217), + [anon_sym_do] = ACTIONS(217), + [anon_sym_while] = ACTIONS(217), + [anon_sym_try] = ACTIONS(217), + [anon_sym_PLUS_EQ] = ACTIONS(219), + [anon_sym_DASH_EQ] = ACTIONS(219), + [anon_sym_STAR_EQ] = ACTIONS(219), + [anon_sym_SLASH_EQ] = ACTIONS(219), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(219), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(219), + [anon_sym_PERCENT_EQ] = ACTIONS(219), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(219), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(219), + [anon_sym_LT_LT_EQ] = ACTIONS(219), + [anon_sym_GT_GT_EQ] = ACTIONS(219), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(219), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(219), + [anon_sym_AMP_EQ] = ACTIONS(219), + [anon_sym_PIPE_EQ] = ACTIONS(219), + [anon_sym_CARET_EQ] = ACTIONS(219), + [anon_sym_QMARK] = ACTIONS(219), + [anon_sym_EQ_EQ] = ACTIONS(219), + [anon_sym_LT] = ACTIONS(217), + [anon_sym_GT] = ACTIONS(217), + [anon_sym_LT_EQ] = ACTIONS(217), + [anon_sym_GT_EQ] = ACTIONS(219), + [anon_sym_BANG_EQ] = ACTIONS(219), + [anon_sym_LT_EQ_GT] = ACTIONS(219), + [anon_sym_LT_LT] = ACTIONS(217), + [anon_sym_GT_GT] = ACTIONS(217), + [anon_sym_TILDE_GT_GT] = ACTIONS(217), + [anon_sym_CARET_GT_GT] = ACTIONS(217), + [anon_sym_DASH] = ACTIONS(217), + [anon_sym_PLUS] = ACTIONS(217), + [anon_sym_PIPE] = ACTIONS(217), + [anon_sym_CARET] = ACTIONS(217), + [anon_sym_STAR] = ACTIONS(217), + [anon_sym_SLASH] = ACTIONS(217), + [anon_sym_PERCENT] = ACTIONS(217), + [anon_sym_TILDE_SLASH] = ACTIONS(217), + [anon_sym_CARET_SLASH] = ACTIONS(217), + [anon_sym_TILDE_PERCENT] = ACTIONS(217), + [anon_sym_CARET_PERCENT] = ACTIONS(217), + [anon_sym_SLASH_PERCENT] = ACTIONS(219), + [anon_sym_AMP] = ACTIONS(217), + [anon_sym_TILDE] = ACTIONS(217), + [anon_sym_DOT] = ACTIONS(219), + [anon_sym_LBRACK] = ACTIONS(219), + [anon_sym_int] = ACTIONS(217), + [anon_sym_cell] = ACTIONS(217), + [anon_sym_slice] = ACTIONS(217), + [anon_sym_builder] = ACTIONS(217), + [anon_sym_cont] = ACTIONS(217), + [anon_sym_tuple] = ACTIONS(217), + [sym_var_type] = ACTIONS(217), + [aux_sym_number_literal_token1] = ACTIONS(217), + [sym_string_literal] = ACTIONS(217), + [sym_number_string_literal] = ACTIONS(219), + [sym_slice_string_literal] = ACTIONS(219), + [sym_underscore] = ACTIONS(217), + [sym_comment] = ACTIONS(3), + }, + [STATE(20)] = { + [sym_identifier] = ACTIONS(221), + [anon_sym_SEMI] = ACTIONS(221), + [anon_sym_EQ] = ACTIONS(221), + [anon_sym_LPAREN] = ACTIONS(223), + [anon_sym_return] = ACTIONS(221), + [anon_sym_LBRACE] = ACTIONS(221), + [anon_sym_RBRACE] = ACTIONS(223), + [anon_sym_repeat] = ACTIONS(221), + [anon_sym_if] = ACTIONS(221), + [anon_sym_ifnot] = ACTIONS(221), + [anon_sym_do] = ACTIONS(221), + [anon_sym_while] = ACTIONS(221), + [anon_sym_try] = ACTIONS(221), + [anon_sym_PLUS_EQ] = ACTIONS(223), + [anon_sym_DASH_EQ] = ACTIONS(223), + [anon_sym_STAR_EQ] = ACTIONS(223), + [anon_sym_SLASH_EQ] = ACTIONS(223), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(223), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(223), + [anon_sym_PERCENT_EQ] = ACTIONS(223), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(223), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(223), + [anon_sym_LT_LT_EQ] = ACTIONS(223), + [anon_sym_GT_GT_EQ] = ACTIONS(223), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(223), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(223), + [anon_sym_AMP_EQ] = ACTIONS(223), + [anon_sym_PIPE_EQ] = ACTIONS(223), + [anon_sym_CARET_EQ] = ACTIONS(223), + [anon_sym_QMARK] = ACTIONS(223), + [anon_sym_EQ_EQ] = ACTIONS(223), + [anon_sym_LT] = ACTIONS(221), + [anon_sym_GT] = ACTIONS(221), + [anon_sym_LT_EQ] = ACTIONS(221), + [anon_sym_GT_EQ] = ACTIONS(223), + [anon_sym_BANG_EQ] = ACTIONS(223), + [anon_sym_LT_EQ_GT] = ACTIONS(223), + [anon_sym_LT_LT] = ACTIONS(221), + [anon_sym_GT_GT] = ACTIONS(221), + [anon_sym_TILDE_GT_GT] = ACTIONS(221), + [anon_sym_CARET_GT_GT] = ACTIONS(221), + [anon_sym_DASH] = ACTIONS(221), + [anon_sym_PLUS] = ACTIONS(221), + [anon_sym_PIPE] = ACTIONS(221), + [anon_sym_CARET] = ACTIONS(221), + [anon_sym_STAR] = ACTIONS(221), + [anon_sym_SLASH] = ACTIONS(221), + [anon_sym_PERCENT] = ACTIONS(221), + [anon_sym_TILDE_SLASH] = ACTIONS(221), + [anon_sym_CARET_SLASH] = ACTIONS(221), + [anon_sym_TILDE_PERCENT] = ACTIONS(221), + [anon_sym_CARET_PERCENT] = ACTIONS(221), + [anon_sym_SLASH_PERCENT] = ACTIONS(223), + [anon_sym_AMP] = ACTIONS(221), + [anon_sym_TILDE] = ACTIONS(221), + [anon_sym_DOT] = ACTIONS(223), + [anon_sym_LBRACK] = ACTIONS(223), + [anon_sym_int] = ACTIONS(221), + [anon_sym_cell] = ACTIONS(221), + [anon_sym_slice] = ACTIONS(221), + [anon_sym_builder] = ACTIONS(221), + [anon_sym_cont] = ACTIONS(221), + [anon_sym_tuple] = ACTIONS(221), + [sym_var_type] = ACTIONS(221), + [aux_sym_number_literal_token1] = ACTIONS(221), + [sym_string_literal] = ACTIONS(221), + [sym_number_string_literal] = ACTIONS(223), + [sym_slice_string_literal] = ACTIONS(223), + [sym_underscore] = ACTIONS(221), + [sym_comment] = ACTIONS(3), + }, + [STATE(21)] = { + [sym_identifier] = ACTIONS(225), + [anon_sym_SEMI] = ACTIONS(225), + [anon_sym_EQ] = ACTIONS(225), + [anon_sym_LPAREN] = ACTIONS(227), + [anon_sym_return] = ACTIONS(225), + [anon_sym_LBRACE] = ACTIONS(225), + [anon_sym_RBRACE] = ACTIONS(227), + [anon_sym_repeat] = ACTIONS(225), + [anon_sym_if] = ACTIONS(225), + [anon_sym_ifnot] = ACTIONS(225), + [anon_sym_do] = ACTIONS(225), + [anon_sym_while] = ACTIONS(225), + [anon_sym_try] = ACTIONS(225), + [anon_sym_PLUS_EQ] = ACTIONS(227), + [anon_sym_DASH_EQ] = ACTIONS(227), + [anon_sym_STAR_EQ] = ACTIONS(227), + [anon_sym_SLASH_EQ] = ACTIONS(227), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(227), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(227), + [anon_sym_PERCENT_EQ] = ACTIONS(227), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(227), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(227), + [anon_sym_LT_LT_EQ] = ACTIONS(227), + [anon_sym_GT_GT_EQ] = ACTIONS(227), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(227), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(227), + [anon_sym_AMP_EQ] = ACTIONS(227), + [anon_sym_PIPE_EQ] = ACTIONS(227), + [anon_sym_CARET_EQ] = ACTIONS(227), + [anon_sym_QMARK] = ACTIONS(227), + [anon_sym_EQ_EQ] = ACTIONS(227), + [anon_sym_LT] = ACTIONS(225), + [anon_sym_GT] = ACTIONS(225), + [anon_sym_LT_EQ] = ACTIONS(225), + [anon_sym_GT_EQ] = ACTIONS(227), + [anon_sym_BANG_EQ] = ACTIONS(227), + [anon_sym_LT_EQ_GT] = ACTIONS(227), + [anon_sym_LT_LT] = ACTIONS(225), + [anon_sym_GT_GT] = ACTIONS(225), + [anon_sym_TILDE_GT_GT] = ACTIONS(225), + [anon_sym_CARET_GT_GT] = ACTIONS(225), + [anon_sym_DASH] = ACTIONS(225), + [anon_sym_PLUS] = ACTIONS(225), + [anon_sym_PIPE] = ACTIONS(225), + [anon_sym_CARET] = ACTIONS(225), + [anon_sym_STAR] = ACTIONS(225), + [anon_sym_SLASH] = ACTIONS(225), + [anon_sym_PERCENT] = ACTIONS(225), + [anon_sym_TILDE_SLASH] = ACTIONS(225), + [anon_sym_CARET_SLASH] = ACTIONS(225), + [anon_sym_TILDE_PERCENT] = ACTIONS(225), + [anon_sym_CARET_PERCENT] = ACTIONS(225), + [anon_sym_SLASH_PERCENT] = ACTIONS(227), + [anon_sym_AMP] = ACTIONS(225), + [anon_sym_TILDE] = ACTIONS(225), + [anon_sym_DOT] = ACTIONS(227), + [anon_sym_LBRACK] = ACTIONS(227), + [anon_sym_int] = ACTIONS(225), + [anon_sym_cell] = ACTIONS(225), + [anon_sym_slice] = ACTIONS(225), + [anon_sym_builder] = ACTIONS(225), + [anon_sym_cont] = ACTIONS(225), + [anon_sym_tuple] = ACTIONS(225), + [sym_var_type] = ACTIONS(225), + [aux_sym_number_literal_token1] = ACTIONS(225), + [sym_string_literal] = ACTIONS(225), + [sym_number_string_literal] = ACTIONS(227), + [sym_slice_string_literal] = ACTIONS(227), + [sym_underscore] = ACTIONS(225), + [sym_comment] = ACTIONS(3), + }, + [STATE(22)] = { + [sym_identifier] = ACTIONS(229), + [anon_sym_SEMI] = ACTIONS(229), + [anon_sym_EQ] = ACTIONS(229), + [anon_sym_LPAREN] = ACTIONS(231), + [anon_sym_return] = ACTIONS(229), + [anon_sym_LBRACE] = ACTIONS(229), + [anon_sym_RBRACE] = ACTIONS(231), + [anon_sym_repeat] = ACTIONS(229), + [anon_sym_if] = ACTIONS(229), + [anon_sym_ifnot] = ACTIONS(229), + [anon_sym_do] = ACTIONS(229), + [anon_sym_while] = ACTIONS(229), + [anon_sym_try] = ACTIONS(229), + [anon_sym_PLUS_EQ] = ACTIONS(231), + [anon_sym_DASH_EQ] = ACTIONS(231), + [anon_sym_STAR_EQ] = ACTIONS(231), + [anon_sym_SLASH_EQ] = ACTIONS(231), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(231), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(231), + [anon_sym_PERCENT_EQ] = ACTIONS(231), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(231), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(231), + [anon_sym_LT_LT_EQ] = ACTIONS(231), + [anon_sym_GT_GT_EQ] = ACTIONS(231), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(231), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(231), + [anon_sym_AMP_EQ] = ACTIONS(231), + [anon_sym_PIPE_EQ] = ACTIONS(231), + [anon_sym_CARET_EQ] = ACTIONS(231), + [anon_sym_QMARK] = ACTIONS(231), + [anon_sym_EQ_EQ] = ACTIONS(231), + [anon_sym_LT] = ACTIONS(229), + [anon_sym_GT] = ACTIONS(229), + [anon_sym_LT_EQ] = ACTIONS(229), + [anon_sym_GT_EQ] = ACTIONS(231), + [anon_sym_BANG_EQ] = ACTIONS(231), + [anon_sym_LT_EQ_GT] = ACTIONS(231), + [anon_sym_LT_LT] = ACTIONS(229), + [anon_sym_GT_GT] = ACTIONS(229), + [anon_sym_TILDE_GT_GT] = ACTIONS(229), + [anon_sym_CARET_GT_GT] = ACTIONS(229), + [anon_sym_DASH] = ACTIONS(229), + [anon_sym_PLUS] = ACTIONS(229), + [anon_sym_PIPE] = ACTIONS(229), + [anon_sym_CARET] = ACTIONS(229), + [anon_sym_STAR] = ACTIONS(229), + [anon_sym_SLASH] = ACTIONS(229), + [anon_sym_PERCENT] = ACTIONS(229), + [anon_sym_TILDE_SLASH] = ACTIONS(229), + [anon_sym_CARET_SLASH] = ACTIONS(229), + [anon_sym_TILDE_PERCENT] = ACTIONS(229), + [anon_sym_CARET_PERCENT] = ACTIONS(229), + [anon_sym_SLASH_PERCENT] = ACTIONS(231), + [anon_sym_AMP] = ACTIONS(229), + [anon_sym_TILDE] = ACTIONS(229), + [anon_sym_DOT] = ACTIONS(231), + [anon_sym_LBRACK] = ACTIONS(231), + [anon_sym_int] = ACTIONS(229), + [anon_sym_cell] = ACTIONS(229), + [anon_sym_slice] = ACTIONS(229), + [anon_sym_builder] = ACTIONS(229), + [anon_sym_cont] = ACTIONS(229), + [anon_sym_tuple] = ACTIONS(229), + [sym_var_type] = ACTIONS(229), + [aux_sym_number_literal_token1] = ACTIONS(229), + [sym_string_literal] = ACTIONS(229), + [sym_number_string_literal] = ACTIONS(231), + [sym_slice_string_literal] = ACTIONS(231), + [sym_underscore] = ACTIONS(229), + [sym_comment] = ACTIONS(3), + }, + [STATE(23)] = { + [aux_sym__expr30_repeat1] = STATE(23), + [sym_identifier] = ACTIONS(233), + [anon_sym_SEMI] = ACTIONS(233), + [anon_sym_EQ] = ACTIONS(233), + [anon_sym_LPAREN] = ACTIONS(235), + [anon_sym_return] = ACTIONS(233), + [anon_sym_LBRACE] = ACTIONS(233), + [anon_sym_RBRACE] = ACTIONS(235), + [anon_sym_repeat] = ACTIONS(233), + [anon_sym_if] = ACTIONS(233), + [anon_sym_ifnot] = ACTIONS(233), + [anon_sym_do] = ACTIONS(233), + [anon_sym_while] = ACTIONS(233), + [anon_sym_try] = ACTIONS(233), + [anon_sym_PLUS_EQ] = ACTIONS(235), + [anon_sym_DASH_EQ] = ACTIONS(235), + [anon_sym_STAR_EQ] = ACTIONS(235), + [anon_sym_SLASH_EQ] = ACTIONS(235), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(235), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(235), + [anon_sym_PERCENT_EQ] = ACTIONS(235), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(235), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(235), + [anon_sym_LT_LT_EQ] = ACTIONS(235), + [anon_sym_GT_GT_EQ] = ACTIONS(235), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(235), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(235), + [anon_sym_AMP_EQ] = ACTIONS(235), + [anon_sym_PIPE_EQ] = ACTIONS(235), + [anon_sym_CARET_EQ] = ACTIONS(235), + [anon_sym_QMARK] = ACTIONS(235), + [anon_sym_EQ_EQ] = ACTIONS(235), + [anon_sym_LT] = ACTIONS(233), + [anon_sym_GT] = ACTIONS(233), + [anon_sym_LT_EQ] = ACTIONS(233), + [anon_sym_GT_EQ] = ACTIONS(235), + [anon_sym_BANG_EQ] = ACTIONS(235), + [anon_sym_LT_EQ_GT] = ACTIONS(235), + [anon_sym_LT_LT] = ACTIONS(233), + [anon_sym_GT_GT] = ACTIONS(233), + [anon_sym_TILDE_GT_GT] = ACTIONS(233), + [anon_sym_CARET_GT_GT] = ACTIONS(233), + [anon_sym_DASH] = ACTIONS(233), + [anon_sym_PLUS] = ACTIONS(233), + [anon_sym_PIPE] = ACTIONS(233), + [anon_sym_CARET] = ACTIONS(233), + [anon_sym_STAR] = ACTIONS(237), + [anon_sym_SLASH] = ACTIONS(237), + [anon_sym_PERCENT] = ACTIONS(237), + [anon_sym_TILDE_SLASH] = ACTIONS(237), + [anon_sym_CARET_SLASH] = ACTIONS(237), + [anon_sym_TILDE_PERCENT] = ACTIONS(237), + [anon_sym_CARET_PERCENT] = ACTIONS(237), + [anon_sym_SLASH_PERCENT] = ACTIONS(240), + [anon_sym_AMP] = ACTIONS(237), + [anon_sym_TILDE] = ACTIONS(233), + [anon_sym_LBRACK] = ACTIONS(235), + [anon_sym_int] = ACTIONS(233), + [anon_sym_cell] = ACTIONS(233), + [anon_sym_slice] = ACTIONS(233), + [anon_sym_builder] = ACTIONS(233), + [anon_sym_cont] = ACTIONS(233), + [anon_sym_tuple] = ACTIONS(233), + [sym_var_type] = ACTIONS(233), + [aux_sym_number_literal_token1] = ACTIONS(233), + [sym_string_literal] = ACTIONS(233), + [sym_number_string_literal] = ACTIONS(235), + [sym_slice_string_literal] = ACTIONS(235), + [sym_underscore] = ACTIONS(233), + [sym_comment] = ACTIONS(3), + }, + [STATE(24)] = { + [sym_identifier] = ACTIONS(85), + [anon_sym_SEMI] = ACTIONS(85), + [anon_sym_EQ] = ACTIONS(85), + [anon_sym_LPAREN] = ACTIONS(87), + [anon_sym_return] = ACTIONS(85), + [anon_sym_LBRACE] = ACTIONS(85), + [anon_sym_RBRACE] = ACTIONS(87), + [anon_sym_repeat] = ACTIONS(85), + [anon_sym_if] = ACTIONS(85), + [anon_sym_ifnot] = ACTIONS(85), + [anon_sym_do] = ACTIONS(85), + [anon_sym_while] = ACTIONS(85), + [anon_sym_try] = ACTIONS(85), + [anon_sym_PLUS_EQ] = ACTIONS(87), + [anon_sym_DASH_EQ] = ACTIONS(87), + [anon_sym_STAR_EQ] = ACTIONS(87), + [anon_sym_SLASH_EQ] = ACTIONS(87), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(87), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(87), + [anon_sym_PERCENT_EQ] = ACTIONS(87), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(87), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(87), + [anon_sym_LT_LT_EQ] = ACTIONS(87), + [anon_sym_GT_GT_EQ] = ACTIONS(87), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(87), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(87), + [anon_sym_AMP_EQ] = ACTIONS(87), + [anon_sym_PIPE_EQ] = ACTIONS(87), + [anon_sym_CARET_EQ] = ACTIONS(87), + [anon_sym_QMARK] = ACTIONS(87), + [anon_sym_EQ_EQ] = ACTIONS(87), + [anon_sym_LT] = ACTIONS(85), + [anon_sym_GT] = ACTIONS(85), + [anon_sym_LT_EQ] = ACTIONS(85), + [anon_sym_GT_EQ] = ACTIONS(87), + [anon_sym_BANG_EQ] = ACTIONS(87), + [anon_sym_LT_EQ_GT] = ACTIONS(87), + [anon_sym_LT_LT] = ACTIONS(85), + [anon_sym_GT_GT] = ACTIONS(85), + [anon_sym_TILDE_GT_GT] = ACTIONS(85), + [anon_sym_CARET_GT_GT] = ACTIONS(85), + [anon_sym_DASH] = ACTIONS(85), + [anon_sym_PLUS] = ACTIONS(85), + [anon_sym_PIPE] = ACTIONS(85), + [anon_sym_CARET] = ACTIONS(85), + [anon_sym_STAR] = ACTIONS(85), + [anon_sym_SLASH] = ACTIONS(85), + [anon_sym_PERCENT] = ACTIONS(85), + [anon_sym_TILDE_SLASH] = ACTIONS(85), + [anon_sym_CARET_SLASH] = ACTIONS(85), + [anon_sym_TILDE_PERCENT] = ACTIONS(85), + [anon_sym_CARET_PERCENT] = ACTIONS(85), + [anon_sym_SLASH_PERCENT] = ACTIONS(87), + [anon_sym_AMP] = ACTIONS(85), + [anon_sym_TILDE] = ACTIONS(85), + [anon_sym_DOT] = ACTIONS(87), + [anon_sym_LBRACK] = ACTIONS(87), + [anon_sym_int] = ACTIONS(85), + [anon_sym_cell] = ACTIONS(85), + [anon_sym_slice] = ACTIONS(85), + [anon_sym_builder] = ACTIONS(85), + [anon_sym_cont] = ACTIONS(85), + [anon_sym_tuple] = ACTIONS(85), + [sym_var_type] = ACTIONS(85), + [aux_sym_number_literal_token1] = ACTIONS(85), + [sym_string_literal] = ACTIONS(85), + [sym_number_string_literal] = ACTIONS(87), + [sym_slice_string_literal] = ACTIONS(87), + [sym_underscore] = ACTIONS(85), + [sym_comment] = ACTIONS(3), + }, + [STATE(25)] = { + [sym_identifier] = ACTIONS(243), + [anon_sym_SEMI] = ACTIONS(243), + [anon_sym_EQ] = ACTIONS(243), + [anon_sym_LPAREN] = ACTIONS(245), + [anon_sym_return] = ACTIONS(243), + [anon_sym_LBRACE] = ACTIONS(243), + [anon_sym_RBRACE] = ACTIONS(245), + [anon_sym_repeat] = ACTIONS(243), + [anon_sym_if] = ACTIONS(243), + [anon_sym_ifnot] = ACTIONS(243), + [anon_sym_do] = ACTIONS(243), + [anon_sym_while] = ACTIONS(243), + [anon_sym_try] = ACTIONS(243), + [anon_sym_PLUS_EQ] = ACTIONS(245), + [anon_sym_DASH_EQ] = ACTIONS(245), + [anon_sym_STAR_EQ] = ACTIONS(245), + [anon_sym_SLASH_EQ] = ACTIONS(245), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(245), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(245), + [anon_sym_PERCENT_EQ] = ACTIONS(245), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(245), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(245), + [anon_sym_LT_LT_EQ] = ACTIONS(245), + [anon_sym_GT_GT_EQ] = ACTIONS(245), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(245), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(245), + [anon_sym_AMP_EQ] = ACTIONS(245), + [anon_sym_PIPE_EQ] = ACTIONS(245), + [anon_sym_CARET_EQ] = ACTIONS(245), + [anon_sym_QMARK] = ACTIONS(245), + [anon_sym_EQ_EQ] = ACTIONS(245), + [anon_sym_LT] = ACTIONS(243), + [anon_sym_GT] = ACTIONS(243), + [anon_sym_LT_EQ] = ACTIONS(243), + [anon_sym_GT_EQ] = ACTIONS(245), + [anon_sym_BANG_EQ] = ACTIONS(245), + [anon_sym_LT_EQ_GT] = ACTIONS(245), + [anon_sym_LT_LT] = ACTIONS(243), + [anon_sym_GT_GT] = ACTIONS(243), + [anon_sym_TILDE_GT_GT] = ACTIONS(243), + [anon_sym_CARET_GT_GT] = ACTIONS(243), + [anon_sym_DASH] = ACTIONS(243), + [anon_sym_PLUS] = ACTIONS(243), + [anon_sym_PIPE] = ACTIONS(243), + [anon_sym_CARET] = ACTIONS(243), + [anon_sym_STAR] = ACTIONS(243), + [anon_sym_SLASH] = ACTIONS(243), + [anon_sym_PERCENT] = ACTIONS(243), + [anon_sym_TILDE_SLASH] = ACTIONS(243), + [anon_sym_CARET_SLASH] = ACTIONS(243), + [anon_sym_TILDE_PERCENT] = ACTIONS(243), + [anon_sym_CARET_PERCENT] = ACTIONS(243), + [anon_sym_SLASH_PERCENT] = ACTIONS(245), + [anon_sym_AMP] = ACTIONS(243), + [anon_sym_TILDE] = ACTIONS(243), + [anon_sym_DOT] = ACTIONS(245), + [anon_sym_LBRACK] = ACTIONS(245), + [anon_sym_int] = ACTIONS(243), + [anon_sym_cell] = ACTIONS(243), + [anon_sym_slice] = ACTIONS(243), + [anon_sym_builder] = ACTIONS(243), + [anon_sym_cont] = ACTIONS(243), + [anon_sym_tuple] = ACTIONS(243), + [sym_var_type] = ACTIONS(243), + [aux_sym_number_literal_token1] = ACTIONS(243), + [sym_string_literal] = ACTIONS(243), + [sym_number_string_literal] = ACTIONS(245), + [sym_slice_string_literal] = ACTIONS(245), + [sym_underscore] = ACTIONS(243), + [sym_comment] = ACTIONS(3), + }, + [STATE(26)] = { + [sym_identifier] = ACTIONS(247), + [anon_sym_SEMI] = ACTIONS(247), + [anon_sym_EQ] = ACTIONS(247), + [anon_sym_LPAREN] = ACTIONS(249), + [anon_sym_return] = ACTIONS(247), + [anon_sym_LBRACE] = ACTIONS(247), + [anon_sym_RBRACE] = ACTIONS(249), + [anon_sym_repeat] = ACTIONS(247), + [anon_sym_if] = ACTIONS(247), + [anon_sym_ifnot] = ACTIONS(247), + [anon_sym_do] = ACTIONS(247), + [anon_sym_while] = ACTIONS(247), + [anon_sym_try] = ACTIONS(247), + [anon_sym_PLUS_EQ] = ACTIONS(249), + [anon_sym_DASH_EQ] = ACTIONS(249), + [anon_sym_STAR_EQ] = ACTIONS(249), + [anon_sym_SLASH_EQ] = ACTIONS(249), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(249), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(249), + [anon_sym_PERCENT_EQ] = ACTIONS(249), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(249), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(249), + [anon_sym_LT_LT_EQ] = ACTIONS(249), + [anon_sym_GT_GT_EQ] = ACTIONS(249), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(249), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(249), + [anon_sym_AMP_EQ] = ACTIONS(249), + [anon_sym_PIPE_EQ] = ACTIONS(249), + [anon_sym_CARET_EQ] = ACTIONS(249), + [anon_sym_QMARK] = ACTIONS(249), + [anon_sym_EQ_EQ] = ACTIONS(249), + [anon_sym_LT] = ACTIONS(247), + [anon_sym_GT] = ACTIONS(247), + [anon_sym_LT_EQ] = ACTIONS(247), + [anon_sym_GT_EQ] = ACTIONS(249), + [anon_sym_BANG_EQ] = ACTIONS(249), + [anon_sym_LT_EQ_GT] = ACTIONS(249), + [anon_sym_LT_LT] = ACTIONS(247), + [anon_sym_GT_GT] = ACTIONS(247), + [anon_sym_TILDE_GT_GT] = ACTIONS(247), + [anon_sym_CARET_GT_GT] = ACTIONS(247), + [anon_sym_DASH] = ACTIONS(247), + [anon_sym_PLUS] = ACTIONS(247), + [anon_sym_PIPE] = ACTIONS(247), + [anon_sym_CARET] = ACTIONS(247), + [anon_sym_STAR] = ACTIONS(247), + [anon_sym_SLASH] = ACTIONS(247), + [anon_sym_PERCENT] = ACTIONS(247), + [anon_sym_TILDE_SLASH] = ACTIONS(247), + [anon_sym_CARET_SLASH] = ACTIONS(247), + [anon_sym_TILDE_PERCENT] = ACTIONS(247), + [anon_sym_CARET_PERCENT] = ACTIONS(247), + [anon_sym_SLASH_PERCENT] = ACTIONS(249), + [anon_sym_AMP] = ACTIONS(247), + [anon_sym_TILDE] = ACTIONS(247), + [anon_sym_DOT] = ACTIONS(249), + [anon_sym_LBRACK] = ACTIONS(249), + [anon_sym_int] = ACTIONS(247), + [anon_sym_cell] = ACTIONS(247), + [anon_sym_slice] = ACTIONS(247), + [anon_sym_builder] = ACTIONS(247), + [anon_sym_cont] = ACTIONS(247), + [anon_sym_tuple] = ACTIONS(247), + [sym_var_type] = ACTIONS(247), + [aux_sym_number_literal_token1] = ACTIONS(247), + [sym_string_literal] = ACTIONS(247), + [sym_number_string_literal] = ACTIONS(249), + [sym_slice_string_literal] = ACTIONS(249), + [sym_underscore] = ACTIONS(247), + [sym_comment] = ACTIONS(3), + }, + [STATE(27)] = { + [sym_identifier] = ACTIONS(251), + [anon_sym_SEMI] = ACTIONS(251), + [anon_sym_EQ] = ACTIONS(251), + [anon_sym_LPAREN] = ACTIONS(253), + [anon_sym_return] = ACTIONS(251), + [anon_sym_LBRACE] = ACTIONS(251), + [anon_sym_RBRACE] = ACTIONS(253), + [anon_sym_repeat] = ACTIONS(251), + [anon_sym_if] = ACTIONS(251), + [anon_sym_ifnot] = ACTIONS(251), + [anon_sym_do] = ACTIONS(251), + [anon_sym_while] = ACTIONS(251), + [anon_sym_try] = ACTIONS(251), + [anon_sym_PLUS_EQ] = ACTIONS(253), + [anon_sym_DASH_EQ] = ACTIONS(253), + [anon_sym_STAR_EQ] = ACTIONS(253), + [anon_sym_SLASH_EQ] = ACTIONS(253), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(253), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(253), + [anon_sym_PERCENT_EQ] = ACTIONS(253), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(253), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(253), + [anon_sym_LT_LT_EQ] = ACTIONS(253), + [anon_sym_GT_GT_EQ] = ACTIONS(253), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(253), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(253), + [anon_sym_AMP_EQ] = ACTIONS(253), + [anon_sym_PIPE_EQ] = ACTIONS(253), + [anon_sym_CARET_EQ] = ACTIONS(253), + [anon_sym_QMARK] = ACTIONS(253), + [anon_sym_EQ_EQ] = ACTIONS(253), + [anon_sym_LT] = ACTIONS(251), + [anon_sym_GT] = ACTIONS(251), + [anon_sym_LT_EQ] = ACTIONS(251), + [anon_sym_GT_EQ] = ACTIONS(253), + [anon_sym_BANG_EQ] = ACTIONS(253), + [anon_sym_LT_EQ_GT] = ACTIONS(253), + [anon_sym_LT_LT] = ACTIONS(251), + [anon_sym_GT_GT] = ACTIONS(251), + [anon_sym_TILDE_GT_GT] = ACTIONS(251), + [anon_sym_CARET_GT_GT] = ACTIONS(251), + [anon_sym_DASH] = ACTIONS(251), + [anon_sym_PLUS] = ACTIONS(251), + [anon_sym_PIPE] = ACTIONS(251), + [anon_sym_CARET] = ACTIONS(251), + [anon_sym_STAR] = ACTIONS(251), + [anon_sym_SLASH] = ACTIONS(251), + [anon_sym_PERCENT] = ACTIONS(251), + [anon_sym_TILDE_SLASH] = ACTIONS(251), + [anon_sym_CARET_SLASH] = ACTIONS(251), + [anon_sym_TILDE_PERCENT] = ACTIONS(251), + [anon_sym_CARET_PERCENT] = ACTIONS(251), + [anon_sym_SLASH_PERCENT] = ACTIONS(253), + [anon_sym_AMP] = ACTIONS(251), + [anon_sym_TILDE] = ACTIONS(251), + [anon_sym_DOT] = ACTIONS(253), + [anon_sym_LBRACK] = ACTIONS(253), + [anon_sym_int] = ACTIONS(251), + [anon_sym_cell] = ACTIONS(251), + [anon_sym_slice] = ACTIONS(251), + [anon_sym_builder] = ACTIONS(251), + [anon_sym_cont] = ACTIONS(251), + [anon_sym_tuple] = ACTIONS(251), + [sym_var_type] = ACTIONS(251), + [aux_sym_number_literal_token1] = ACTIONS(251), + [sym_string_literal] = ACTIONS(251), + [sym_number_string_literal] = ACTIONS(253), + [sym_slice_string_literal] = ACTIONS(253), + [sym_underscore] = ACTIONS(251), + [sym_comment] = ACTIONS(3), + }, + [STATE(28)] = { + [sym_identifier] = ACTIONS(255), + [anon_sym_SEMI] = ACTIONS(255), + [anon_sym_EQ] = ACTIONS(255), + [anon_sym_LPAREN] = ACTIONS(257), + [anon_sym_return] = ACTIONS(255), + [anon_sym_LBRACE] = ACTIONS(255), + [anon_sym_RBRACE] = ACTIONS(257), + [anon_sym_repeat] = ACTIONS(255), + [anon_sym_if] = ACTIONS(255), + [anon_sym_ifnot] = ACTIONS(255), + [anon_sym_do] = ACTIONS(255), + [anon_sym_while] = ACTIONS(255), + [anon_sym_try] = ACTIONS(255), + [anon_sym_PLUS_EQ] = ACTIONS(257), + [anon_sym_DASH_EQ] = ACTIONS(257), + [anon_sym_STAR_EQ] = ACTIONS(257), + [anon_sym_SLASH_EQ] = ACTIONS(257), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(257), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(257), + [anon_sym_PERCENT_EQ] = ACTIONS(257), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(257), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(257), + [anon_sym_LT_LT_EQ] = ACTIONS(257), + [anon_sym_GT_GT_EQ] = ACTIONS(257), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(257), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(257), + [anon_sym_AMP_EQ] = ACTIONS(257), + [anon_sym_PIPE_EQ] = ACTIONS(257), + [anon_sym_CARET_EQ] = ACTIONS(257), + [anon_sym_QMARK] = ACTIONS(257), + [anon_sym_EQ_EQ] = ACTIONS(257), + [anon_sym_LT] = ACTIONS(255), + [anon_sym_GT] = ACTIONS(255), + [anon_sym_LT_EQ] = ACTIONS(255), + [anon_sym_GT_EQ] = ACTIONS(257), + [anon_sym_BANG_EQ] = ACTIONS(257), + [anon_sym_LT_EQ_GT] = ACTIONS(257), + [anon_sym_LT_LT] = ACTIONS(255), + [anon_sym_GT_GT] = ACTIONS(255), + [anon_sym_TILDE_GT_GT] = ACTIONS(255), + [anon_sym_CARET_GT_GT] = ACTIONS(255), + [anon_sym_DASH] = ACTIONS(255), + [anon_sym_PLUS] = ACTIONS(255), + [anon_sym_PIPE] = ACTIONS(255), + [anon_sym_CARET] = ACTIONS(255), + [anon_sym_STAR] = ACTIONS(255), + [anon_sym_SLASH] = ACTIONS(255), + [anon_sym_PERCENT] = ACTIONS(255), + [anon_sym_TILDE_SLASH] = ACTIONS(255), + [anon_sym_CARET_SLASH] = ACTIONS(255), + [anon_sym_TILDE_PERCENT] = ACTIONS(255), + [anon_sym_CARET_PERCENT] = ACTIONS(255), + [anon_sym_SLASH_PERCENT] = ACTIONS(257), + [anon_sym_AMP] = ACTIONS(255), + [anon_sym_TILDE] = ACTIONS(255), + [anon_sym_DOT] = ACTIONS(257), + [anon_sym_LBRACK] = ACTIONS(257), + [anon_sym_int] = ACTIONS(255), + [anon_sym_cell] = ACTIONS(255), + [anon_sym_slice] = ACTIONS(255), + [anon_sym_builder] = ACTIONS(255), + [anon_sym_cont] = ACTIONS(255), + [anon_sym_tuple] = ACTIONS(255), + [sym_var_type] = ACTIONS(255), + [aux_sym_number_literal_token1] = ACTIONS(255), + [sym_string_literal] = ACTIONS(255), + [sym_number_string_literal] = ACTIONS(257), + [sym_slice_string_literal] = ACTIONS(257), + [sym_underscore] = ACTIONS(255), + [sym_comment] = ACTIONS(3), + }, + [STATE(29)] = { + [sym_identifier] = ACTIONS(259), + [anon_sym_SEMI] = ACTIONS(259), + [anon_sym_EQ] = ACTIONS(259), + [anon_sym_LPAREN] = ACTIONS(261), + [anon_sym_return] = ACTIONS(259), + [anon_sym_LBRACE] = ACTIONS(259), + [anon_sym_RBRACE] = ACTIONS(261), + [anon_sym_repeat] = ACTIONS(259), + [anon_sym_if] = ACTIONS(259), + [anon_sym_ifnot] = ACTIONS(259), + [anon_sym_do] = ACTIONS(259), + [anon_sym_while] = ACTIONS(259), + [anon_sym_try] = ACTIONS(259), + [anon_sym_PLUS_EQ] = ACTIONS(261), + [anon_sym_DASH_EQ] = ACTIONS(261), + [anon_sym_STAR_EQ] = ACTIONS(261), + [anon_sym_SLASH_EQ] = ACTIONS(261), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(261), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(261), + [anon_sym_PERCENT_EQ] = ACTIONS(261), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(261), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(261), + [anon_sym_LT_LT_EQ] = ACTIONS(261), + [anon_sym_GT_GT_EQ] = ACTIONS(261), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(261), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(261), + [anon_sym_AMP_EQ] = ACTIONS(261), + [anon_sym_PIPE_EQ] = ACTIONS(261), + [anon_sym_CARET_EQ] = ACTIONS(261), + [anon_sym_QMARK] = ACTIONS(261), + [anon_sym_EQ_EQ] = ACTIONS(261), + [anon_sym_LT] = ACTIONS(259), + [anon_sym_GT] = ACTIONS(259), + [anon_sym_LT_EQ] = ACTIONS(259), + [anon_sym_GT_EQ] = ACTIONS(261), + [anon_sym_BANG_EQ] = ACTIONS(261), + [anon_sym_LT_EQ_GT] = ACTIONS(261), + [anon_sym_LT_LT] = ACTIONS(259), + [anon_sym_GT_GT] = ACTIONS(259), + [anon_sym_TILDE_GT_GT] = ACTIONS(259), + [anon_sym_CARET_GT_GT] = ACTIONS(259), + [anon_sym_DASH] = ACTIONS(259), + [anon_sym_PLUS] = ACTIONS(259), + [anon_sym_PIPE] = ACTIONS(259), + [anon_sym_CARET] = ACTIONS(259), + [anon_sym_STAR] = ACTIONS(259), + [anon_sym_SLASH] = ACTIONS(259), + [anon_sym_PERCENT] = ACTIONS(259), + [anon_sym_TILDE_SLASH] = ACTIONS(259), + [anon_sym_CARET_SLASH] = ACTIONS(259), + [anon_sym_TILDE_PERCENT] = ACTIONS(259), + [anon_sym_CARET_PERCENT] = ACTIONS(259), + [anon_sym_SLASH_PERCENT] = ACTIONS(261), + [anon_sym_AMP] = ACTIONS(259), + [anon_sym_TILDE] = ACTIONS(259), + [anon_sym_DOT] = ACTIONS(261), + [anon_sym_LBRACK] = ACTIONS(261), + [anon_sym_int] = ACTIONS(259), + [anon_sym_cell] = ACTIONS(259), + [anon_sym_slice] = ACTIONS(259), + [anon_sym_builder] = ACTIONS(259), + [anon_sym_cont] = ACTIONS(259), + [anon_sym_tuple] = ACTIONS(259), + [sym_var_type] = ACTIONS(259), + [aux_sym_number_literal_token1] = ACTIONS(259), + [sym_string_literal] = ACTIONS(259), + [sym_number_string_literal] = ACTIONS(261), + [sym_slice_string_literal] = ACTIONS(261), + [sym_underscore] = ACTIONS(259), + [sym_comment] = ACTIONS(3), + }, + [STATE(30)] = { + [sym_identifier] = ACTIONS(263), + [anon_sym_SEMI] = ACTIONS(263), + [anon_sym_EQ] = ACTIONS(263), + [anon_sym_LPAREN] = ACTIONS(265), + [anon_sym_return] = ACTIONS(263), + [anon_sym_LBRACE] = ACTIONS(263), + [anon_sym_RBRACE] = ACTIONS(265), + [anon_sym_repeat] = ACTIONS(263), + [anon_sym_if] = ACTIONS(263), + [anon_sym_ifnot] = ACTIONS(263), + [anon_sym_do] = ACTIONS(263), + [anon_sym_while] = ACTIONS(263), + [anon_sym_try] = ACTIONS(263), + [anon_sym_PLUS_EQ] = ACTIONS(265), + [anon_sym_DASH_EQ] = ACTIONS(265), + [anon_sym_STAR_EQ] = ACTIONS(265), + [anon_sym_SLASH_EQ] = ACTIONS(265), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(265), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(265), + [anon_sym_PERCENT_EQ] = ACTIONS(265), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(265), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(265), + [anon_sym_LT_LT_EQ] = ACTIONS(265), + [anon_sym_GT_GT_EQ] = ACTIONS(265), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(265), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(265), + [anon_sym_AMP_EQ] = ACTIONS(265), + [anon_sym_PIPE_EQ] = ACTIONS(265), + [anon_sym_CARET_EQ] = ACTIONS(265), + [anon_sym_QMARK] = ACTIONS(265), + [anon_sym_EQ_EQ] = ACTIONS(265), + [anon_sym_LT] = ACTIONS(263), + [anon_sym_GT] = ACTIONS(263), + [anon_sym_LT_EQ] = ACTIONS(263), + [anon_sym_GT_EQ] = ACTIONS(265), + [anon_sym_BANG_EQ] = ACTIONS(265), + [anon_sym_LT_EQ_GT] = ACTIONS(265), + [anon_sym_LT_LT] = ACTIONS(263), + [anon_sym_GT_GT] = ACTIONS(263), + [anon_sym_TILDE_GT_GT] = ACTIONS(263), + [anon_sym_CARET_GT_GT] = ACTIONS(263), + [anon_sym_DASH] = ACTIONS(263), + [anon_sym_PLUS] = ACTIONS(263), + [anon_sym_PIPE] = ACTIONS(263), + [anon_sym_CARET] = ACTIONS(263), + [anon_sym_STAR] = ACTIONS(263), + [anon_sym_SLASH] = ACTIONS(263), + [anon_sym_PERCENT] = ACTIONS(263), + [anon_sym_TILDE_SLASH] = ACTIONS(263), + [anon_sym_CARET_SLASH] = ACTIONS(263), + [anon_sym_TILDE_PERCENT] = ACTIONS(263), + [anon_sym_CARET_PERCENT] = ACTIONS(263), + [anon_sym_SLASH_PERCENT] = ACTIONS(265), + [anon_sym_AMP] = ACTIONS(263), + [anon_sym_TILDE] = ACTIONS(263), + [anon_sym_DOT] = ACTIONS(265), + [anon_sym_LBRACK] = ACTIONS(265), + [anon_sym_int] = ACTIONS(263), + [anon_sym_cell] = ACTIONS(263), + [anon_sym_slice] = ACTIONS(263), + [anon_sym_builder] = ACTIONS(263), + [anon_sym_cont] = ACTIONS(263), + [anon_sym_tuple] = ACTIONS(263), + [sym_var_type] = ACTIONS(263), + [aux_sym_number_literal_token1] = ACTIONS(263), + [sym_string_literal] = ACTIONS(263), + [sym_number_string_literal] = ACTIONS(265), + [sym_slice_string_literal] = ACTIONS(265), + [sym_underscore] = ACTIONS(263), + [sym_comment] = ACTIONS(3), + }, + [STATE(31)] = { + [sym_identifier] = ACTIONS(267), + [anon_sym_SEMI] = ACTIONS(267), + [anon_sym_EQ] = ACTIONS(267), + [anon_sym_LPAREN] = ACTIONS(269), + [anon_sym_return] = ACTIONS(267), + [anon_sym_LBRACE] = ACTIONS(267), + [anon_sym_RBRACE] = ACTIONS(269), + [anon_sym_repeat] = ACTIONS(267), + [anon_sym_if] = ACTIONS(267), + [anon_sym_ifnot] = ACTIONS(267), + [anon_sym_do] = ACTIONS(267), + [anon_sym_while] = ACTIONS(267), + [anon_sym_try] = ACTIONS(267), + [anon_sym_PLUS_EQ] = ACTIONS(269), + [anon_sym_DASH_EQ] = ACTIONS(269), + [anon_sym_STAR_EQ] = ACTIONS(269), + [anon_sym_SLASH_EQ] = ACTIONS(269), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(269), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(269), + [anon_sym_PERCENT_EQ] = ACTIONS(269), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(269), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(269), + [anon_sym_LT_LT_EQ] = ACTIONS(269), + [anon_sym_GT_GT_EQ] = ACTIONS(269), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(269), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(269), + [anon_sym_AMP_EQ] = ACTIONS(269), + [anon_sym_PIPE_EQ] = ACTIONS(269), + [anon_sym_CARET_EQ] = ACTIONS(269), + [anon_sym_QMARK] = ACTIONS(269), + [anon_sym_EQ_EQ] = ACTIONS(269), + [anon_sym_LT] = ACTIONS(267), + [anon_sym_GT] = ACTIONS(267), + [anon_sym_LT_EQ] = ACTIONS(267), + [anon_sym_GT_EQ] = ACTIONS(269), + [anon_sym_BANG_EQ] = ACTIONS(269), + [anon_sym_LT_EQ_GT] = ACTIONS(269), + [anon_sym_LT_LT] = ACTIONS(267), + [anon_sym_GT_GT] = ACTIONS(267), + [anon_sym_TILDE_GT_GT] = ACTIONS(267), + [anon_sym_CARET_GT_GT] = ACTIONS(267), + [anon_sym_DASH] = ACTIONS(267), + [anon_sym_PLUS] = ACTIONS(267), + [anon_sym_PIPE] = ACTIONS(267), + [anon_sym_CARET] = ACTIONS(267), + [anon_sym_STAR] = ACTIONS(267), + [anon_sym_SLASH] = ACTIONS(267), + [anon_sym_PERCENT] = ACTIONS(267), + [anon_sym_TILDE_SLASH] = ACTIONS(267), + [anon_sym_CARET_SLASH] = ACTIONS(267), + [anon_sym_TILDE_PERCENT] = ACTIONS(267), + [anon_sym_CARET_PERCENT] = ACTIONS(267), + [anon_sym_SLASH_PERCENT] = ACTIONS(269), + [anon_sym_AMP] = ACTIONS(267), + [anon_sym_TILDE] = ACTIONS(267), + [anon_sym_DOT] = ACTIONS(269), + [anon_sym_LBRACK] = ACTIONS(269), + [anon_sym_int] = ACTIONS(267), + [anon_sym_cell] = ACTIONS(267), + [anon_sym_slice] = ACTIONS(267), + [anon_sym_builder] = ACTIONS(267), + [anon_sym_cont] = ACTIONS(267), + [anon_sym_tuple] = ACTIONS(267), + [sym_var_type] = ACTIONS(267), + [aux_sym_number_literal_token1] = ACTIONS(267), + [sym_string_literal] = ACTIONS(267), + [sym_number_string_literal] = ACTIONS(269), + [sym_slice_string_literal] = ACTIONS(269), + [sym_underscore] = ACTIONS(267), + [sym_comment] = ACTIONS(3), + }, + [STATE(32)] = { + [sym_identifier] = ACTIONS(271), + [anon_sym_SEMI] = ACTIONS(271), + [anon_sym_EQ] = ACTIONS(271), + [anon_sym_LPAREN] = ACTIONS(273), + [anon_sym_return] = ACTIONS(271), + [anon_sym_LBRACE] = ACTIONS(271), + [anon_sym_RBRACE] = ACTIONS(273), + [anon_sym_repeat] = ACTIONS(271), + [anon_sym_if] = ACTIONS(271), + [anon_sym_ifnot] = ACTIONS(271), + [anon_sym_do] = ACTIONS(271), + [anon_sym_while] = ACTIONS(271), + [anon_sym_try] = ACTIONS(271), + [anon_sym_PLUS_EQ] = ACTIONS(273), + [anon_sym_DASH_EQ] = ACTIONS(273), + [anon_sym_STAR_EQ] = ACTIONS(273), + [anon_sym_SLASH_EQ] = ACTIONS(273), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(273), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(273), + [anon_sym_PERCENT_EQ] = ACTIONS(273), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(273), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(273), + [anon_sym_LT_LT_EQ] = ACTIONS(273), + [anon_sym_GT_GT_EQ] = ACTIONS(273), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(273), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(273), + [anon_sym_AMP_EQ] = ACTIONS(273), + [anon_sym_PIPE_EQ] = ACTIONS(273), + [anon_sym_CARET_EQ] = ACTIONS(273), + [anon_sym_QMARK] = ACTIONS(273), + [anon_sym_EQ_EQ] = ACTIONS(273), + [anon_sym_LT] = ACTIONS(271), + [anon_sym_GT] = ACTIONS(271), + [anon_sym_LT_EQ] = ACTIONS(271), + [anon_sym_GT_EQ] = ACTIONS(273), + [anon_sym_BANG_EQ] = ACTIONS(273), + [anon_sym_LT_EQ_GT] = ACTIONS(273), + [anon_sym_LT_LT] = ACTIONS(271), + [anon_sym_GT_GT] = ACTIONS(271), + [anon_sym_TILDE_GT_GT] = ACTIONS(271), + [anon_sym_CARET_GT_GT] = ACTIONS(271), + [anon_sym_DASH] = ACTIONS(271), + [anon_sym_PLUS] = ACTIONS(271), + [anon_sym_PIPE] = ACTIONS(271), + [anon_sym_CARET] = ACTIONS(271), + [anon_sym_STAR] = ACTIONS(271), + [anon_sym_SLASH] = ACTIONS(271), + [anon_sym_PERCENT] = ACTIONS(271), + [anon_sym_TILDE_SLASH] = ACTIONS(271), + [anon_sym_CARET_SLASH] = ACTIONS(271), + [anon_sym_TILDE_PERCENT] = ACTIONS(271), + [anon_sym_CARET_PERCENT] = ACTIONS(271), + [anon_sym_SLASH_PERCENT] = ACTIONS(273), + [anon_sym_AMP] = ACTIONS(271), + [anon_sym_TILDE] = ACTIONS(271), + [anon_sym_DOT] = ACTIONS(273), + [anon_sym_LBRACK] = ACTIONS(273), + [anon_sym_int] = ACTIONS(271), + [anon_sym_cell] = ACTIONS(271), + [anon_sym_slice] = ACTIONS(271), + [anon_sym_builder] = ACTIONS(271), + [anon_sym_cont] = ACTIONS(271), + [anon_sym_tuple] = ACTIONS(271), + [sym_var_type] = ACTIONS(271), + [aux_sym_number_literal_token1] = ACTIONS(271), + [sym_string_literal] = ACTIONS(271), + [sym_number_string_literal] = ACTIONS(273), + [sym_slice_string_literal] = ACTIONS(273), + [sym_underscore] = ACTIONS(271), + [sym_comment] = ACTIONS(3), + }, + [STATE(33)] = { + [sym_identifier] = ACTIONS(275), + [anon_sym_SEMI] = ACTIONS(275), + [anon_sym_EQ] = ACTIONS(275), + [anon_sym_LPAREN] = ACTIONS(277), + [anon_sym_return] = ACTIONS(275), + [anon_sym_LBRACE] = ACTIONS(275), + [anon_sym_RBRACE] = ACTIONS(277), + [anon_sym_repeat] = ACTIONS(275), + [anon_sym_if] = ACTIONS(275), + [anon_sym_ifnot] = ACTIONS(275), + [anon_sym_do] = ACTIONS(275), + [anon_sym_while] = ACTIONS(275), + [anon_sym_try] = ACTIONS(275), + [anon_sym_PLUS_EQ] = ACTIONS(277), + [anon_sym_DASH_EQ] = ACTIONS(277), + [anon_sym_STAR_EQ] = ACTIONS(277), + [anon_sym_SLASH_EQ] = ACTIONS(277), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(277), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(277), + [anon_sym_PERCENT_EQ] = ACTIONS(277), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(277), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(277), + [anon_sym_LT_LT_EQ] = ACTIONS(277), + [anon_sym_GT_GT_EQ] = ACTIONS(277), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(277), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(277), + [anon_sym_AMP_EQ] = ACTIONS(277), + [anon_sym_PIPE_EQ] = ACTIONS(277), + [anon_sym_CARET_EQ] = ACTIONS(277), + [anon_sym_QMARK] = ACTIONS(277), + [anon_sym_EQ_EQ] = ACTIONS(277), + [anon_sym_LT] = ACTIONS(275), + [anon_sym_GT] = ACTIONS(275), + [anon_sym_LT_EQ] = ACTIONS(275), + [anon_sym_GT_EQ] = ACTIONS(277), + [anon_sym_BANG_EQ] = ACTIONS(277), + [anon_sym_LT_EQ_GT] = ACTIONS(277), + [anon_sym_LT_LT] = ACTIONS(275), + [anon_sym_GT_GT] = ACTIONS(275), + [anon_sym_TILDE_GT_GT] = ACTIONS(275), + [anon_sym_CARET_GT_GT] = ACTIONS(275), + [anon_sym_DASH] = ACTIONS(275), + [anon_sym_PLUS] = ACTIONS(275), + [anon_sym_PIPE] = ACTIONS(275), + [anon_sym_CARET] = ACTIONS(275), + [anon_sym_STAR] = ACTIONS(275), + [anon_sym_SLASH] = ACTIONS(275), + [anon_sym_PERCENT] = ACTIONS(275), + [anon_sym_TILDE_SLASH] = ACTIONS(275), + [anon_sym_CARET_SLASH] = ACTIONS(275), + [anon_sym_TILDE_PERCENT] = ACTIONS(275), + [anon_sym_CARET_PERCENT] = ACTIONS(275), + [anon_sym_SLASH_PERCENT] = ACTIONS(277), + [anon_sym_AMP] = ACTIONS(275), + [anon_sym_TILDE] = ACTIONS(275), + [anon_sym_DOT] = ACTIONS(277), + [anon_sym_LBRACK] = ACTIONS(277), + [anon_sym_int] = ACTIONS(275), + [anon_sym_cell] = ACTIONS(275), + [anon_sym_slice] = ACTIONS(275), + [anon_sym_builder] = ACTIONS(275), + [anon_sym_cont] = ACTIONS(275), + [anon_sym_tuple] = ACTIONS(275), + [sym_var_type] = ACTIONS(275), + [aux_sym_number_literal_token1] = ACTIONS(275), + [sym_string_literal] = ACTIONS(275), + [sym_number_string_literal] = ACTIONS(277), + [sym_slice_string_literal] = ACTIONS(277), + [sym_underscore] = ACTIONS(275), + [sym_comment] = ACTIONS(3), + }, + [STATE(34)] = { + [sym__statement] = STATE(12), + [sym_return_statement] = STATE(12), + [sym_block_statement] = STATE(12), + [sym_expression_statement] = STATE(12), + [sym_empty_statement] = STATE(12), + [sym_repeat_statement] = STATE(12), + [sym_if_statement] = STATE(12), + [sym_do_while_statement] = STATE(12), + [sym_while_statement] = STATE(12), + [sym_try_catch_statement] = STATE(12), + [sym__expression] = STATE(179), + [sym__expr10] = STATE(179), + [sym__expr13] = STATE(139), + [sym__expr15] = STATE(136), + [sym__expr17] = STATE(75), + [sym__expr20] = STATE(47), + [sym__expr30] = STATE(40), + [sym__expr75] = STATE(15), + [sym__expr80] = STATE(15), + [sym__expr90] = STATE(6), + [sym_function_application] = STATE(6), + [sym_local_vars_declaration] = STATE(6), + [sym_tuple_vars_declaration] = STATE(16), + [sym_tensor_vars_declaration] = STATE(16), + [sym_var_declaration] = STATE(16), + [sym__var_declaration_lhs] = STATE(16), + [sym__nontype_expr100] = STATE(6), + [sym__expr100] = STATE(6), + [sym_parenthesized_expression] = STATE(6), + [sym_tensor_expression] = STATE(6), + [sym_typed_tuple] = STATE(6), + [sym__type_hint] = STATE(387), + [sym_function_type] = STATE(387), + [sym__atomic_type] = STATE(260), + [sym__parenthesized_type] = STATE(260), + [sym_primitive_type] = STATE(260), + [sym_tensor_type] = STATE(260), + [sym_tuple_type] = STATE(260), + [sym_hole_type] = STATE(260), + [sym_type_identifier] = STATE(260), + [sym_number_literal] = STATE(6), + [aux_sym_block_statement_repeat1] = STATE(12), + [sym_identifier] = ACTIONS(91), + [anon_sym_SEMI] = ACTIONS(93), + [anon_sym_LPAREN] = ACTIONS(95), + [anon_sym_return] = ACTIONS(97), + [anon_sym_LBRACE] = ACTIONS(99), + [anon_sym_RBRACE] = ACTIONS(279), + [anon_sym_repeat] = ACTIONS(103), + [anon_sym_if] = ACTIONS(105), + [anon_sym_ifnot] = ACTIONS(105), + [anon_sym_do] = ACTIONS(107), + [anon_sym_while] = ACTIONS(109), + [anon_sym_try] = ACTIONS(111), + [anon_sym_DASH] = ACTIONS(113), + [anon_sym_TILDE] = ACTIONS(115), + [anon_sym_LBRACK] = ACTIONS(117), + [anon_sym_int] = ACTIONS(25), + [anon_sym_cell] = ACTIONS(25), + [anon_sym_slice] = ACTIONS(25), + [anon_sym_builder] = ACTIONS(25), + [anon_sym_cont] = ACTIONS(25), + [anon_sym_tuple] = ACTIONS(25), + [sym_var_type] = ACTIONS(27), + [aux_sym_number_literal_token1] = ACTIONS(119), + [sym_string_literal] = ACTIONS(121), + [sym_number_string_literal] = ACTIONS(123), + [sym_slice_string_literal] = ACTIONS(125), + [sym_underscore] = ACTIONS(127), + [sym_comment] = ACTIONS(3), + }, + [STATE(35)] = { + [sym__statement] = STATE(13), + [sym_return_statement] = STATE(13), + [sym_block_statement] = STATE(13), + [sym_expression_statement] = STATE(13), + [sym_empty_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_do_while_statement] = STATE(13), + [sym_while_statement] = STATE(13), + [sym_try_catch_statement] = STATE(13), + [sym__expression] = STATE(179), + [sym__expr10] = STATE(179), + [sym__expr13] = STATE(139), + [sym__expr15] = STATE(136), + [sym__expr17] = STATE(75), + [sym__expr20] = STATE(47), + [sym__expr30] = STATE(40), + [sym__expr75] = STATE(15), + [sym__expr80] = STATE(15), + [sym__expr90] = STATE(6), + [sym_function_application] = STATE(6), + [sym_local_vars_declaration] = STATE(6), + [sym_tuple_vars_declaration] = STATE(16), + [sym_tensor_vars_declaration] = STATE(16), + [sym_var_declaration] = STATE(16), + [sym__var_declaration_lhs] = STATE(16), + [sym__nontype_expr100] = STATE(6), + [sym__expr100] = STATE(6), + [sym_parenthesized_expression] = STATE(6), + [sym_tensor_expression] = STATE(6), + [sym_typed_tuple] = STATE(6), + [sym__type_hint] = STATE(387), + [sym_function_type] = STATE(387), + [sym__atomic_type] = STATE(260), + [sym__parenthesized_type] = STATE(260), + [sym_primitive_type] = STATE(260), + [sym_tensor_type] = STATE(260), + [sym_tuple_type] = STATE(260), + [sym_hole_type] = STATE(260), + [sym_type_identifier] = STATE(260), + [sym_number_literal] = STATE(6), + [aux_sym_block_statement_repeat1] = STATE(13), + [sym_identifier] = ACTIONS(91), + [anon_sym_SEMI] = ACTIONS(93), + [anon_sym_LPAREN] = ACTIONS(95), + [anon_sym_return] = ACTIONS(97), + [anon_sym_LBRACE] = ACTIONS(99), + [anon_sym_RBRACE] = ACTIONS(281), + [anon_sym_repeat] = ACTIONS(103), + [anon_sym_if] = ACTIONS(105), + [anon_sym_ifnot] = ACTIONS(105), + [anon_sym_do] = ACTIONS(107), + [anon_sym_while] = ACTIONS(109), + [anon_sym_try] = ACTIONS(111), + [anon_sym_DASH] = ACTIONS(113), + [anon_sym_TILDE] = ACTIONS(115), + [anon_sym_LBRACK] = ACTIONS(117), + [anon_sym_int] = ACTIONS(25), + [anon_sym_cell] = ACTIONS(25), + [anon_sym_slice] = ACTIONS(25), + [anon_sym_builder] = ACTIONS(25), + [anon_sym_cont] = ACTIONS(25), + [anon_sym_tuple] = ACTIONS(25), + [sym_var_type] = ACTIONS(27), + [aux_sym_number_literal_token1] = ACTIONS(119), + [sym_string_literal] = ACTIONS(121), + [sym_number_string_literal] = ACTIONS(123), + [sym_slice_string_literal] = ACTIONS(125), + [sym_underscore] = ACTIONS(127), + [sym_comment] = ACTIONS(3), + }, + [STATE(36)] = { + [sym_identifier] = ACTIONS(233), + [anon_sym_SEMI] = ACTIONS(233), + [anon_sym_EQ] = ACTIONS(233), + [anon_sym_LPAREN] = ACTIONS(235), + [anon_sym_return] = ACTIONS(233), + [anon_sym_LBRACE] = ACTIONS(233), + [anon_sym_RBRACE] = ACTIONS(235), + [anon_sym_repeat] = ACTIONS(233), + [anon_sym_if] = ACTIONS(233), + [anon_sym_ifnot] = ACTIONS(233), + [anon_sym_do] = ACTIONS(233), + [anon_sym_while] = ACTIONS(233), + [anon_sym_try] = ACTIONS(233), + [anon_sym_PLUS_EQ] = ACTIONS(235), + [anon_sym_DASH_EQ] = ACTIONS(235), + [anon_sym_STAR_EQ] = ACTIONS(235), + [anon_sym_SLASH_EQ] = ACTIONS(235), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(235), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(235), + [anon_sym_PERCENT_EQ] = ACTIONS(235), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(235), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(235), + [anon_sym_LT_LT_EQ] = ACTIONS(235), + [anon_sym_GT_GT_EQ] = ACTIONS(235), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(235), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(235), + [anon_sym_AMP_EQ] = ACTIONS(235), + [anon_sym_PIPE_EQ] = ACTIONS(235), + [anon_sym_CARET_EQ] = ACTIONS(235), + [anon_sym_QMARK] = ACTIONS(235), + [anon_sym_EQ_EQ] = ACTIONS(235), + [anon_sym_LT] = ACTIONS(233), + [anon_sym_GT] = ACTIONS(233), + [anon_sym_LT_EQ] = ACTIONS(233), + [anon_sym_GT_EQ] = ACTIONS(235), + [anon_sym_BANG_EQ] = ACTIONS(235), + [anon_sym_LT_EQ_GT] = ACTIONS(235), + [anon_sym_LT_LT] = ACTIONS(233), + [anon_sym_GT_GT] = ACTIONS(233), + [anon_sym_TILDE_GT_GT] = ACTIONS(233), + [anon_sym_CARET_GT_GT] = ACTIONS(233), + [anon_sym_DASH] = ACTIONS(233), + [anon_sym_PLUS] = ACTIONS(233), + [anon_sym_PIPE] = ACTIONS(233), + [anon_sym_CARET] = ACTIONS(233), + [anon_sym_STAR] = ACTIONS(233), + [anon_sym_SLASH] = ACTIONS(233), + [anon_sym_PERCENT] = ACTIONS(233), + [anon_sym_TILDE_SLASH] = ACTIONS(233), + [anon_sym_CARET_SLASH] = ACTIONS(233), + [anon_sym_TILDE_PERCENT] = ACTIONS(233), + [anon_sym_CARET_PERCENT] = ACTIONS(233), + [anon_sym_SLASH_PERCENT] = ACTIONS(235), + [anon_sym_AMP] = ACTIONS(233), + [anon_sym_TILDE] = ACTIONS(233), + [anon_sym_LBRACK] = ACTIONS(235), + [anon_sym_int] = ACTIONS(233), + [anon_sym_cell] = ACTIONS(233), + [anon_sym_slice] = ACTIONS(233), + [anon_sym_builder] = ACTIONS(233), + [anon_sym_cont] = ACTIONS(233), + [anon_sym_tuple] = ACTIONS(233), + [sym_var_type] = ACTIONS(233), + [aux_sym_number_literal_token1] = ACTIONS(233), + [sym_string_literal] = ACTIONS(233), + [sym_number_string_literal] = ACTIONS(235), + [sym_slice_string_literal] = ACTIONS(235), + [sym_underscore] = ACTIONS(233), + [sym_comment] = ACTIONS(3), + }, + [STATE(37)] = { + [sym_identifier] = ACTIONS(283), + [anon_sym_SEMI] = ACTIONS(283), + [anon_sym_EQ] = ACTIONS(283), + [anon_sym_LPAREN] = ACTIONS(285), + [anon_sym_return] = ACTIONS(283), + [anon_sym_LBRACE] = ACTIONS(283), + [anon_sym_RBRACE] = ACTIONS(285), + [anon_sym_repeat] = ACTIONS(283), + [anon_sym_if] = ACTIONS(283), + [anon_sym_ifnot] = ACTIONS(283), + [anon_sym_do] = ACTIONS(283), + [anon_sym_while] = ACTIONS(283), + [anon_sym_try] = ACTIONS(283), + [anon_sym_PLUS_EQ] = ACTIONS(285), + [anon_sym_DASH_EQ] = ACTIONS(285), + [anon_sym_STAR_EQ] = ACTIONS(285), + [anon_sym_SLASH_EQ] = ACTIONS(285), + [anon_sym_TILDE_SLASH_EQ] = ACTIONS(285), + [anon_sym_CARET_SLASH_EQ] = ACTIONS(285), + [anon_sym_PERCENT_EQ] = ACTIONS(285), + [anon_sym_TILDE_PERCENT_EQ] = ACTIONS(285), + [anon_sym_CARET_PERCENT_EQ] = ACTIONS(285), + [anon_sym_LT_LT_EQ] = ACTIONS(285), + [anon_sym_GT_GT_EQ] = ACTIONS(285), + [anon_sym_TILDE_GT_GT_EQ] = ACTIONS(285), + [anon_sym_CARET_GT_GT_EQ] = ACTIONS(285), + [anon_sym_AMP_EQ] = ACTIONS(285), + [anon_sym_PIPE_EQ] = ACTIONS(285), + [anon_sym_CARET_EQ] = ACTIONS(285), + [anon_sym_QMARK] = ACTIONS(285), + [anon_sym_EQ_EQ] = ACTIONS(285), + [anon_sym_LT] = ACTIONS(283), + [anon_sym_GT] = ACTIONS(283), + [anon_sym_LT_EQ] = ACTIONS(283), + [anon_sym_GT_EQ] = ACTIONS(285), + [anon_sym_BANG_EQ] = ACTIONS(285), + [anon_sym_LT_EQ_GT] = ACTIONS(285), + [anon_sym_LT_LT] = ACTIONS(283), + [anon_sym_GT_GT] = ACTIONS(283), + [anon_sym_TILDE_GT_GT] = ACTIONS(283), + [anon_sym_CARET_GT_GT] = ACTIONS(283), + [anon_sym_DASH] = ACTIONS(283), + [anon_sym_PLUS] = ACTIONS(283), + [anon_sym_PIPE] = ACTIONS(283), + [anon_sym_CARET] = ACTIONS(283), + [anon_sym_STAR] = ACTIONS(283), + [anon_sym_SLASH] = ACTIONS(283), + [anon_sym_PERCENT] = ACTIONS(283), + [anon_sym_TILDE_SLASH] = ACTIONS(283), + [anon_sym_CARET_SLASH] = ACTIONS(283), + [anon_sym_TILDE_PERCENT] = ACTIONS(283), + [anon_sym_CARET_PERCENT] = ACTIONS(283), + [anon_sym_SLASH_PERCENT] = ACTIONS(285), + [anon_sym_AMP] = ACTIONS(283), + [anon_sym_TILDE] = ACTIONS(283), + [anon_sym_LBRACK] = ACTIONS(285), + [anon_sym_int] = ACTIONS(283), + [anon_sym_cell] = ACTIONS(283), + [anon_sym_slice] = ACTIONS(283), + [anon_sym_builder] = ACTIONS(283), + [anon_sym_cont] = ACTIONS(283), + [anon_sym_tuple] = ACTIONS(283), + [sym_var_type] = ACTIONS(283), + [aux_sym_number_literal_token1] = ACTIONS(283), + [sym_string_literal] = ACTIONS(283), + [sym_number_string_literal] = ACTIONS(285), + [sym_slice_string_literal] = ACTIONS(285), + [sym_underscore] = ACTIONS(283), + [sym_comment] = ACTIONS(3), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(38), 1, + aux_sym__expr20_repeat1, + ACTIONS(291), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(289), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(287), 29, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [72] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(294), 30, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(296), 30, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + anon_sym_RBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [140] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(41), 1, + aux_sym__expr20_repeat1, + ACTIONS(302), 3, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(300), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(298), 30, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [212] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(38), 1, + aux_sym__expr20_repeat1, + ACTIONS(302), 3, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(306), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(304), 30, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [284] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(43), 1, + aux_sym__expr20_repeat1, + ACTIONS(302), 3, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(306), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(304), 30, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [356] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(38), 1, + aux_sym__expr20_repeat1, + ACTIONS(302), 3, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(310), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(308), 30, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [428] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(287), 33, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [495] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(46), 1, + aux_sym__expr17_repeat1, + ACTIONS(316), 4, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(312), 26, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(314), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [564] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(46), 1, + aux_sym__expr17_repeat1, + ACTIONS(318), 4, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(294), 26, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(296), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [633] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(45), 1, + aux_sym__expr17_repeat1, + ACTIONS(316), 4, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(321), 26, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(323), 26, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [702] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(325), 1, + sym_identifier, + ACTIONS(327), 1, + anon_sym_LPAREN, + STATE(49), 3, + sym_parenthesized_expression, + sym_tensor_expression, + aux_sym_function_application_repeat1, + ACTIONS(31), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(33), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [771] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(329), 1, + sym_identifier, + ACTIONS(332), 1, + anon_sym_LPAREN, + STATE(49), 3, + sym_parenthesized_expression, + sym_tensor_expression, + aux_sym_function_application_repeat1, + ACTIONS(38), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(43), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [840] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(327), 1, + anon_sym_LPAREN, + ACTIONS(335), 1, + sym_identifier, + STATE(48), 3, + sym_parenthesized_expression, + sym_tensor_expression, + aux_sym_function_application_repeat1, + ACTIONS(337), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(339), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [909] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(71), 1, + sym_identifier, + ACTIONS(78), 1, + anon_sym_DASH_GT, + ACTIONS(74), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(76), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [974] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(69), 1, + anon_sym_DASH_GT, + ACTIONS(65), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(67), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1037] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(82), 1, + sym_identifier, + ACTIONS(89), 1, + anon_sym_DASH_GT, + ACTIONS(85), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(87), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1102] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(80), 1, + anon_sym_DASH_GT, + ACTIONS(65), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(67), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1165] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(225), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(227), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1225] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(341), 1, + anon_sym_TILDE, + ACTIONS(344), 1, + anon_sym_DOT, + STATE(56), 2, + sym_method_call, + aux_sym__expr80_repeat1, + ACTIONS(51), 22, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(53), 26, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_RBRACK, + [1291] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(85), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(87), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1351] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(221), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(223), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1411] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(193), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(195), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1471] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(229), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(231), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1531] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(347), 1, + anon_sym_TILDE, + ACTIONS(349), 1, + anon_sym_DOT, + STATE(56), 2, + sym_method_call, + aux_sym__expr80_repeat1, + ACTIONS(45), 22, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(47), 26, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_RBRACK, + [1597] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(243), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(245), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1657] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(247), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(249), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1717] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(251), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(253), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1777] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(255), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(257), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1837] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(259), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(261), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1897] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(263), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(265), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [1957] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(69), 1, + anon_sym_DASH_GT, + ACTIONS(351), 1, + sym_identifier, + ACTIONS(65), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(67), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2021] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(80), 1, + anon_sym_DASH_GT, + ACTIONS(353), 1, + sym_identifier, + ACTIONS(65), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(67), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2085] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(271), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(273), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2145] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(213), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(215), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2205] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(205), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2265] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(89), 1, + anon_sym_DASH_GT, + ACTIONS(355), 1, + sym_identifier, + ACTIONS(85), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(87), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2329] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(78), 1, + anon_sym_DASH_GT, + ACTIONS(357), 1, + sym_identifier, + ACTIONS(74), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(76), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2393] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(365), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + ACTIONS(363), 4, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + ACTIONS(361), 22, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(359), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [2457] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(275), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(277), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2517] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 24, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(219), 28, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2577] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(347), 1, + anon_sym_TILDE, + ACTIONS(349), 1, + anon_sym_DOT, + STATE(61), 2, + sym_method_call, + aux_sym__expr80_repeat1, + ACTIONS(61), 22, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(63), 26, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_RBRACK, + [2643] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(275), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(277), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2701] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(217), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(219), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2759] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(221), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(223), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2817] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(225), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(227), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2875] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(229), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(231), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2933] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(243), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(245), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [2991] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(247), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(249), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3049] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(251), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(253), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3107] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(255), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(257), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3165] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(259), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(261), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3223] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(263), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(265), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3281] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(271), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(273), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3339] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(193), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(195), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3397] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(71), 1, + sym_identifier, + ACTIONS(78), 1, + anon_sym_DASH_GT, + ACTIONS(367), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + ACTIONS(74), 21, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(76), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [3461] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(82), 1, + sym_identifier, + ACTIONS(89), 1, + anon_sym_DASH_GT, + ACTIONS(370), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + ACTIONS(85), 21, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(87), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [3525] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(205), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(207), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3583] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(267), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(269), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3641] = 27, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(99), 1, + anon_sym_LBRACE, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(178), 1, + sym_block_statement, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(366), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [3747] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(213), 23, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + ACTIONS(215), 27, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + anon_sym_RBRACK, + [3805] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(393), 1, + anon_sym_COMMA, + ACTIONS(395), 1, + anon_sym_RPAREN, + STATE(347), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(205), 22, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [3868] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(397), 1, + anon_sym_COMMA, + ACTIONS(399), 1, + anon_sym_RPAREN, + STATE(324), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(205), 22, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [3931] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(180), 1, + sym__if_statement_contents, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(381), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [4034] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(401), 1, + anon_sym_COMMA, + ACTIONS(403), 1, + anon_sym_RBRACK, + STATE(329), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(205), 22, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [4097] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(407), 1, + anon_sym_SLASH_PERCENT, + STATE(107), 1, + aux_sym__expr30_repeat1, + ACTIONS(405), 8, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(209), 14, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(211), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [4160] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(409), 1, + anon_sym_RPAREN, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(342), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [4263] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(170), 1, + sym__if_statement_contents, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(381), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [4366] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(415), 1, + anon_sym_RBRACK, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(283), 2, + sym__type_hint, + sym_function_type, + STATE(352), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(101), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [4469] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(417), 22, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(419), 27, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_LBRACK, + anon_sym_RBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [4526] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(424), 1, + anon_sym_SLASH_PERCENT, + STATE(107), 1, + aux_sym__expr30_repeat1, + ACTIONS(421), 8, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(233), 14, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(235), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [4589] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(407), 1, + anon_sym_SLASH_PERCENT, + STATE(102), 1, + aux_sym__expr30_repeat1, + ACTIONS(405), 8, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(197), 14, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(199), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [4652] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(427), 1, + anon_sym_RPAREN, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(282), 2, + sym__type_hint, + sym_function_type, + STATE(342), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(99), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [4755] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(429), 1, + anon_sym_RBRACK, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(283), 2, + sym__type_hint, + sym_function_type, + STATE(352), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(101), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [4858] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(431), 1, + anon_sym_COMMA, + ACTIONS(433), 1, + anon_sym_RPAREN, + STATE(336), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(205), 22, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [4921] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(435), 1, + anon_sym_COMMA, + ACTIONS(437), 1, + anon_sym_RBRACK, + STATE(339), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(205), 22, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [4984] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(439), 1, + anon_sym_RPAREN, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(332), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5087] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(441), 1, + anon_sym_RPAREN, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(282), 2, + sym__type_hint, + sym_function_type, + STATE(332), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(111), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5190] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(443), 1, + anon_sym_RBRACK, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(283), 2, + sym__type_hint, + sym_function_type, + STATE(333), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(112), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5293] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(445), 1, + anon_sym_COMMA, + ACTIONS(447), 1, + anon_sym_RBRACK, + STATE(350), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(205), 22, + anon_sym_EQ, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + anon_sym_TILDE, + sym_identifier, + ACTIONS(207), 24, + anon_sym_LPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_DOT, + [5356] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(449), 1, + anon_sym_RPAREN, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(282), 2, + sym__type_hint, + sym_function_type, + STATE(343), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(98), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5459] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(451), 1, + anon_sym_RBRACK, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(283), 2, + sym__type_hint, + sym_function_type, + STATE(344), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(116), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5562] = 26, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + ACTIONS(411), 1, + anon_sym_LPAREN, + ACTIONS(413), 1, + anon_sym_LBRACK, + ACTIONS(453), 1, + anon_sym_RPAREN, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(282), 2, + sym__type_hint, + sym_function_type, + STATE(342), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(99), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5665] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(233), 22, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(235), 26, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_RBRACK, + [5721] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(113), 1, + anon_sym_DASH, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(40), 1, + sym__expr30, + STATE(47), 1, + sym__expr20, + STATE(75), 1, + sym__expr17, + STATE(136), 1, + sym__expr15, + STATE(139), 1, + sym__expr13, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(177), 2, + sym__expression, + sym__expr10, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [5819] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 22, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + anon_sym_STAR, + anon_sym_SLASH, + anon_sym_PERCENT, + anon_sym_TILDE_SLASH, + anon_sym_CARET_SLASH, + anon_sym_TILDE_PERCENT, + anon_sym_CARET_PERCENT, + anon_sym_AMP, + ACTIONS(285), 26, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_SLASH_PERCENT, + anon_sym_RBRACK, + [5875] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(364), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [5975] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(398), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6075] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(376), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6175] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(455), 22, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(457), 26, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_COLON, + anon_sym_LBRACK, + anon_sym_RBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [6231] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(363), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6331] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(297), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6431] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(373), 2, + sym__expression, + sym__expr10, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6531] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(393), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6631] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(392), 2, + sym__expression, + sym__expr10, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6731] = 25, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(163), 1, + sym__expr10, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(197), 1, + sym__expr13, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [6830] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(113), 1, + anon_sym_DASH, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(40), 1, + sym__expr30, + STATE(47), 1, + sym__expr20, + STATE(75), 1, + sym__expr17, + STATE(136), 1, + sym__expr15, + STATE(139), 1, + sym__expr13, + STATE(163), 1, + sym__expr10, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [6927] = 24, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(126), 1, + sym__expr13, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(164), 1, + sym__expr17, + STATE(196), 1, + sym__expr15, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [7023] = 23, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(113), 1, + anon_sym_DASH, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(40), 1, + sym__expr30, + STATE(47), 1, + sym__expr20, + STATE(75), 1, + sym__expr17, + STATE(126), 1, + sym__expr13, + STATE(136), 1, + sym__expr15, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [7117] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(463), 1, + anon_sym_QMARK, + ACTIONS(459), 22, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + ACTIONS(461), 22, + anon_sym_EQ, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + [7172] = 22, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(106), 1, + sym__expr17, + STATE(151), 1, + sym__expr30, + STATE(157), 1, + sym__expr20, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [7262] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(113), 1, + anon_sym_DASH, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(40), 1, + sym__expr30, + STATE(47), 1, + sym__expr20, + STATE(106), 1, + sym__expr17, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [7350] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(469), 5, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(467), 17, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + ACTIONS(465), 22, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_TILDE, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [7404] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(113), 1, + anon_sym_DASH, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(39), 1, + sym__expr20, + STATE(40), 1, + sym__expr30, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [7489] = 21, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(377), 1, + anon_sym_DASH, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(39), 1, + sym__expr20, + STATE(151), 1, + sym__expr30, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [7576] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(152), 1, + sym__expr30, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [7657] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(153), 1, + sym__expr30, + STATE(108), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [7738] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(44), 1, + sym__expr30, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [7817] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(42), 1, + sym__expr30, + STATE(15), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [7896] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(146), 1, + aux_sym__expr20_repeat1, + ACTIONS(471), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(287), 10, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(289), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [7948] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(146), 1, + aux_sym__expr20_repeat1, + ACTIONS(474), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(304), 10, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(306), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8000] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(379), 1, + anon_sym_TILDE, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(120), 2, + sym__expr75, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [8078] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(146), 1, + aux_sym__expr20_repeat1, + ACTIONS(474), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(308), 10, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(310), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8130] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(115), 1, + anon_sym_TILDE, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(36), 2, + sym__expr75, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [8206] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(147), 1, + aux_sym__expr20_repeat1, + ACTIONS(474), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(298), 10, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(300), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8258] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(149), 1, + aux_sym__expr20_repeat1, + ACTIONS(474), 4, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(304), 10, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(306), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8310] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(287), 14, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + anon_sym_DASH, + anon_sym_PLUS, + anon_sym_PIPE, + anon_sym_CARET, + ACTIONS(289), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8357] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(373), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_LPAREN, + ACTIONS(381), 1, + anon_sym_LBRACK, + ACTIONS(383), 1, + aux_sym_number_literal_token1, + ACTIONS(385), 1, + sym_string_literal, + ACTIONS(387), 1, + sym_number_string_literal, + ACTIONS(389), 1, + sym_slice_string_literal, + ACTIONS(391), 1, + sym_underscore, + STATE(122), 1, + sym__expr80, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(78), 3, + sym__expr90, + sym_function_application, + sym__expr100, + STATE(72), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(50), 6, + sym_local_vars_declaration, + sym__nontype_expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [8431] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(121), 1, + sym_string_literal, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(125), 1, + sym_slice_string_literal, + ACTIONS(127), 1, + sym_underscore, + STATE(37), 1, + sym__expr80, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(6), 9, + sym__expr90, + sym_function_application, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + [8503] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(156), 1, + aux_sym__expr17_repeat1, + ACTIONS(476), 4, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(294), 6, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + ACTIONS(296), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8551] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(160), 1, + aux_sym__expr17_repeat1, + ACTIONS(479), 4, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(321), 6, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + ACTIONS(323), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8599] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(9), 1, + anon_sym_POUNDinclude, + ACTIONS(11), 1, + anon_sym_SEMI, + ACTIONS(13), 1, + anon_sym_POUNDpragma, + ACTIONS(15), 1, + anon_sym_global, + ACTIONS(17), 1, + anon_sym_const, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(21), 1, + anon_sym_forall, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(481), 1, + ts_builtin_sym_end, + STATE(212), 1, + sym_type_parameters, + STATE(395), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(159), 8, + sym__top_level_item, + sym_import_directive, + sym_pragma_directive, + sym_global_var_declarations, + sym_constant_declarations, + sym_function_declaration, + sym_empty_statement, + aux_sym_source_file_repeat1, + [8673] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + ts_builtin_sym_end, + ACTIONS(485), 1, + sym_identifier, + ACTIONS(488), 1, + anon_sym_POUNDinclude, + ACTIONS(491), 1, + anon_sym_SEMI, + ACTIONS(494), 1, + anon_sym_POUNDpragma, + ACTIONS(497), 1, + anon_sym_global, + ACTIONS(500), 1, + anon_sym_const, + ACTIONS(503), 1, + anon_sym_LPAREN, + ACTIONS(506), 1, + anon_sym_forall, + ACTIONS(509), 1, + anon_sym_LBRACK, + ACTIONS(515), 1, + sym_var_type, + ACTIONS(518), 1, + sym_underscore, + STATE(212), 1, + sym_type_parameters, + STATE(395), 2, + sym__type_hint, + sym_function_type, + ACTIONS(512), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + STATE(159), 8, + sym__top_level_item, + sym_import_directive, + sym_pragma_directive, + sym_global_var_declarations, + sym_constant_declarations, + sym_function_declaration, + sym_empty_statement, + aux_sym_source_file_repeat1, + [8747] = 5, + ACTIONS(3), 1, + sym_comment, + STATE(156), 1, + aux_sym__expr17_repeat1, + ACTIONS(479), 4, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_TILDE_GT_GT, + anon_sym_CARET_GT_GT, + ACTIONS(312), 6, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + ACTIONS(314), 25, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + anon_sym_RBRACK, + [8795] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(521), 1, + sym_identifier, + ACTIONS(523), 1, + anon_sym_LPAREN, + ACTIONS(525), 1, + anon_sym_LBRACK, + ACTIONS(527), 1, + aux_sym_number_literal_token1, + ACTIONS(529), 1, + sym_string_literal, + ACTIONS(531), 1, + sym_number_string_literal, + ACTIONS(533), 1, + sym_slice_string_literal, + ACTIONS(535), 1, + sym_underscore, + STATE(400), 2, + sym__type_hint, + sym_function_type, + STATE(94), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(95), 7, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [8862] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(91), 1, + sym_identifier, + ACTIONS(95), 1, + anon_sym_LPAREN, + ACTIONS(117), 1, + anon_sym_LBRACK, + ACTIONS(119), 1, + aux_sym_number_literal_token1, + ACTIONS(123), 1, + sym_number_string_literal, + ACTIONS(127), 1, + sym_underscore, + ACTIONS(537), 1, + sym_string_literal, + ACTIONS(539), 1, + sym_slice_string_literal, + STATE(387), 2, + sym__type_hint, + sym_function_type, + STATE(16), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(31), 7, + sym_local_vars_declaration, + sym__nontype_expr100, + sym__expr100, + sym_parenthesized_expression, + sym_tensor_expression, + sym_typed_tuple, + sym_number_literal, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [8929] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(543), 10, + anon_sym_COMMA, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_COLON, + anon_sym_TILDE, + anon_sym_LBRACK, + anon_sym_RBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(541), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [8968] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(359), 3, + anon_sym_SEMI, + anon_sym_EQ, + anon_sym_LBRACE, + ACTIONS(547), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_LT_EQ, + ACTIONS(545), 4, + anon_sym_EQ_EQ, + anon_sym_GT_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_EQ_GT, + ACTIONS(361), 21, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_QMARK, + anon_sym_COLON, + anon_sym_RBRACK, + [9011] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(551), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(549), 24, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_else, + anon_sym_elseif, + anon_sym_elseifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9049] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(555), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(553), 24, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_else, + anon_sym_elseif, + anon_sym_elseifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9087] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(561), 1, + anon_sym_else, + ACTIONS(563), 2, + anon_sym_elseif, + anon_sym_elseifnot, + ACTIONS(559), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(557), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9129] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(567), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(565), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9164] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(571), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(569), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9199] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(575), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(573), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9234] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(579), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(577), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9269] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(583), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(581), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9304] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(587), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(585), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9339] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(591), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(589), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9374] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(595), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(593), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9409] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(599), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(597), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9444] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(603), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(601), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9479] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(607), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(605), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9514] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(611), 1, + anon_sym_SEMI, + ACTIONS(613), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(609), 20, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9551] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(617), 6, + anon_sym_LPAREN, + anon_sym_RBRACE, + anon_sym_TILDE, + anon_sym_LBRACK, + sym_number_string_literal, + sym_slice_string_literal, + ACTIONS(615), 21, + anon_sym_SEMI, + anon_sym_return, + anon_sym_LBRACE, + anon_sym_repeat, + anon_sym_if, + anon_sym_ifnot, + anon_sym_do, + anon_sym_while, + anon_sym_try, + anon_sym_DASH, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + aux_sym_number_literal_token1, + sym_string_literal, + sym_identifier, + sym_underscore, + [9586] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(621), 1, + anon_sym_RPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9635] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(625), 1, + anon_sym_RBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9684] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(627), 1, + anon_sym_RPAREN, + STATE(282), 2, + sym__type_hint, + sym_function_type, + STATE(301), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9733] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(629), 1, + anon_sym_RPAREN, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9782] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(631), 1, + anon_sym_RBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9831] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(633), 1, + anon_sym_RPAREN, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9880] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(635), 1, + anon_sym_RPAREN, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9929] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(637), 1, + anon_sym_RBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [9978] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(639), 1, + anon_sym_RPAREN, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10027] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(641), 1, + anon_sym_RBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10076] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(643), 1, + anon_sym_RBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10125] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(645), 1, + anon_sym_RBRACK, + STATE(283), 2, + sym__type_hint, + sym_function_type, + STATE(302), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10174] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(647), 1, + anon_sym_RPAREN, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10223] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + ACTIONS(649), 1, + anon_sym_RBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10272] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(623), 1, + anon_sym_LBRACK, + STATE(390), 2, + sym__type_hint, + sym_function_type, + STATE(303), 4, + sym_tuple_vars_declaration, + sym_tensor_vars_declaration, + sym_var_declaration, + sym__var_declaration_lhs, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10318] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(651), 1, + anon_sym_QMARK, + ACTIONS(459), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + ACTIONS(461), 21, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + anon_sym_COLON, + anon_sym_RBRACK, + [10352] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(465), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + ACTIONS(469), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_COLON, + anon_sym_RBRACK, + ACTIONS(653), 17, + anon_sym_EQ, + anon_sym_PLUS_EQ, + anon_sym_DASH_EQ, + anon_sym_STAR_EQ, + anon_sym_SLASH_EQ, + anon_sym_TILDE_SLASH_EQ, + anon_sym_CARET_SLASH_EQ, + anon_sym_PERCENT_EQ, + anon_sym_TILDE_PERCENT_EQ, + anon_sym_CARET_PERCENT_EQ, + anon_sym_LT_LT_EQ, + anon_sym_GT_GT_EQ, + anon_sym_TILDE_GT_GT_EQ, + anon_sym_CARET_GT_GT_EQ, + anon_sym_AMP_EQ, + anon_sym_PIPE_EQ, + anon_sym_CARET_EQ, + [10385] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(655), 1, + sym_identifier, + ACTIONS(657), 1, + anon_sym_RPAREN, + ACTIONS(659), 1, + sym_underscore, + STATE(286), 1, + sym_parameter_declaration, + STATE(287), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10431] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(661), 1, + sym_identifier, + STATE(369), 1, + sym_constant_declaration, + STATE(394), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10474] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(661), 1, + sym_identifier, + STATE(340), 1, + sym_constant_declaration, + STATE(394), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10517] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + STATE(375), 1, + sym_parameter_declaration, + STATE(287), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10560] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(663), 1, + sym_identifier, + STATE(334), 1, + sym_global_var_declaration, + STATE(384), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10603] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(665), 1, + sym_identifier, + ACTIONS(667), 1, + sym_underscore, + STATE(374), 1, + sym_parameter_declaration, + STATE(287), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10646] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(627), 1, + anon_sym_RPAREN, + STATE(311), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10689] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(665), 1, + sym_identifier, + ACTIONS(667), 1, + sym_underscore, + STATE(379), 1, + sym_parameter_declaration, + STATE(287), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10732] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(663), 1, + sym_identifier, + STATE(382), 1, + sym_global_var_declaration, + STATE(384), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10775] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + ACTIONS(645), 1, + anon_sym_RBRACK, + STATE(341), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10818] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + STATE(305), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10858] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + STATE(273), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10898] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(551), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(549), 15, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_until, + anon_sym_catch, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [10926] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(555), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(553), 15, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_until, + anon_sym_catch, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [10954] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(23), 1, + anon_sym_LBRACK, + ACTIONS(27), 1, + sym_var_type, + ACTIONS(29), 1, + sym_underscore, + STATE(397), 2, + sym__type_hint, + sym_function_type, + ACTIONS(25), 6, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + STATE(260), 7, + sym__atomic_type, + sym__parenthesized_type, + sym_primitive_type, + sym_tensor_type, + sym_tuple_type, + sym_hole_type, + sym_type_identifier, + [10994] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(669), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(671), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11020] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(673), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(675), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11046] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(677), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(679), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11072] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(681), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(683), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11098] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(685), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(687), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11124] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(689), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(691), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11150] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(693), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(695), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11176] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(697), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(699), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11202] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(701), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(703), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11228] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(705), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(707), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11254] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(709), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(711), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11280] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(713), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(715), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11306] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(721), 1, + anon_sym_SEMI, + ACTIONS(717), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(719), 12, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11334] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(723), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(725), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11360] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(727), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(729), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11386] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(731), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(733), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11412] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(735), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(737), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11438] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(739), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(741), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11464] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(743), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(745), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11490] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(747), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(749), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11516] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(751), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(753), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11542] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(587), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(585), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11568] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(755), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(757), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11594] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(759), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(761), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11620] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(763), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(765), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11646] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(767), 5, + ts_builtin_sym_end, + anon_sym_POUNDinclude, + anon_sym_POUNDpragma, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(769), 13, + anon_sym_SEMI, + anon_sym_global, + anon_sym_const, + anon_sym_forall, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11672] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(773), 2, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(771), 9, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11691] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(775), 1, + sym_impure, + ACTIONS(777), 1, + anon_sym_inline, + ACTIONS(779), 1, + anon_sym_inline_ref, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(783), 1, + anon_sym_asm, + ACTIONS(785), 1, + anon_sym_LBRACE, + STATE(228), 1, + sym_asm_function_body, + STATE(229), 1, + sym_block_statement, + STATE(278), 1, + sym_inline, + STATE(291), 1, + sym_specifiers_list, + STATE(316), 1, + sym_method_id, + [11728] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(789), 2, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(787), 9, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11747] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(775), 1, + sym_impure, + ACTIONS(777), 1, + anon_sym_inline, + ACTIONS(779), 1, + anon_sym_inline_ref, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(783), 1, + anon_sym_asm, + ACTIONS(785), 1, + anon_sym_LBRACE, + STATE(219), 1, + sym_asm_function_body, + STATE(220), 1, + sym_block_statement, + STATE(278), 1, + sym_inline, + STATE(285), 1, + sym_specifiers_list, + STATE(316), 1, + sym_method_id, + [11784] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(793), 2, + anon_sym_LPAREN, + anon_sym_LBRACK, + ACTIONS(791), 9, + anon_sym_int, + anon_sym_cell, + anon_sym_slice, + anon_sym_builder, + anon_sym_cont, + anon_sym_tuple, + sym_var_type, + sym_identifier, + sym_underscore, + [11803] = 4, + ACTIONS(795), 1, + anon_sym_SPACE, + ACTIONS(800), 1, + sym_comment, + STATE(244), 1, + aux_sym_import_directive_repeat1, + ACTIONS(798), 6, + sym_version_identifier, + anon_sym_version, + anon_sym_not_DASHversion, + anon_sym_allow_DASHpost_DASHmodification, + anon_sym_compute_DASHasm_DASHltr, + sym_string_literal, + [11821] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(775), 1, + sym_impure, + ACTIONS(777), 1, + anon_sym_inline, + ACTIONS(779), 1, + anon_sym_inline_ref, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(802), 1, + anon_sym_SEMI, + STATE(278), 1, + sym_inline, + STATE(316), 1, + sym_method_id, + STATE(396), 1, + sym_specifiers_list, + [11849] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(775), 1, + sym_impure, + ACTIONS(777), 1, + anon_sym_inline, + ACTIONS(779), 1, + anon_sym_inline_ref, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(804), 1, + anon_sym_SEMI, + STATE(278), 1, + sym_inline, + STATE(316), 1, + sym_method_id, + STATE(385), 1, + sym_specifiers_list, + [11877] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(777), 1, + anon_sym_inline, + ACTIONS(779), 1, + anon_sym_inline_ref, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(808), 1, + anon_sym_asm, + STATE(267), 1, + sym_inline, + STATE(314), 1, + sym_method_id, + ACTIONS(806), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [11903] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(810), 1, + anon_sym_SEMI, + ACTIONS(815), 1, + anon_sym_inline, + ACTIONS(818), 1, + anon_sym_asm, + ACTIONS(820), 1, + anon_sym_LBRACE, + ACTIONS(812), 3, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + [11924] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(822), 1, + anon_sym_SEMI, + ACTIONS(827), 1, + anon_sym_inline, + ACTIONS(830), 1, + anon_sym_asm, + ACTIONS(832), 1, + anon_sym_LBRACE, + ACTIONS(824), 3, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + [11945] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 2, + sym_identifier, + sym_underscore, + ACTIONS(78), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [11959] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(836), 2, + anon_sym_inline, + anon_sym_LBRACE, + ACTIONS(834), 4, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + anon_sym_asm, + [11973] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(838), 2, + sym_identifier, + sym_underscore, + ACTIONS(840), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [11987] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(842), 2, + sym_identifier, + sym_underscore, + ACTIONS(844), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12001] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(846), 2, + sym_identifier, + sym_underscore, + ACTIONS(848), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12015] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(351), 2, + sym_identifier, + sym_underscore, + ACTIONS(69), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12029] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(353), 2, + sym_identifier, + sym_underscore, + ACTIONS(80), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12043] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(69), 1, + anon_sym_DASH_GT, + ACTIONS(850), 1, + anon_sym_COMMA, + ACTIONS(853), 1, + anon_sym_RPAREN, + STATE(308), 1, + aux_sym_parameter_list_relaxed_repeat1, + ACTIONS(351), 2, + sym_identifier, + sym_underscore, + [12063] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(856), 2, + sym_identifier, + sym_underscore, + ACTIONS(858), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12077] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(860), 2, + sym_identifier, + sym_underscore, + ACTIONS(862), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12091] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(868), 1, + anon_sym_DASH_GT, + ACTIONS(864), 2, + sym_identifier, + sym_underscore, + ACTIONS(866), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12107] = 5, + ACTIONS(800), 1, + sym_comment, + ACTIONS(870), 1, + anon_sym_SPACE, + STATE(244), 1, + aux_sym_import_directive_repeat1, + ACTIONS(872), 2, + anon_sym_version, + anon_sym_not_DASHversion, + ACTIONS(874), 2, + anon_sym_allow_DASHpost_DASHmodification, + anon_sym_compute_DASHasm_DASHltr, + [12125] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(80), 1, + anon_sym_DASH_GT, + ACTIONS(876), 1, + anon_sym_COMMA, + ACTIONS(879), 1, + anon_sym_RPAREN, + STATE(309), 1, + aux_sym_parameter_list_relaxed_repeat1, + ACTIONS(353), 2, + sym_identifier, + sym_underscore, + [12145] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(355), 2, + sym_identifier, + sym_underscore, + ACTIONS(89), 4, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_DASH_GT, + anon_sym_RBRACK, + [12159] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(882), 1, + anon_sym_RPAREN, + ACTIONS(884), 2, + aux_sym_number_literal_token1, + sym_number_string_literal, + STATE(266), 2, + sym_number_literal, + aux_sym_asm_function_body_repeat2, + [12174] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(886), 1, + anon_sym_RPAREN, + ACTIONS(888), 2, + aux_sym_number_literal_token1, + sym_number_string_literal, + STATE(265), 2, + sym_number_literal, + aux_sym_asm_function_body_repeat2, + [12189] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(891), 1, + anon_sym_RPAREN, + ACTIONS(884), 2, + aux_sym_number_literal_token1, + sym_number_string_literal, + STATE(265), 2, + sym_number_literal, + aux_sym_asm_function_body_repeat2, + [12204] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(895), 1, + anon_sym_asm, + STATE(338), 1, + sym_method_id, + ACTIONS(893), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [12221] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(897), 2, + anon_sym_SEMI, + anon_sym_inline, + ACTIONS(899), 3, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + [12234] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(901), 1, + anon_sym_DASH_GT, + ACTIONS(903), 1, + anon_sym_type, + STATE(351), 1, + sym_type_parameter, + STATE(377), 1, + sym_type_identifier, + [12253] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(891), 1, + anon_sym_RPAREN, + ACTIONS(884), 2, + aux_sym_number_literal_token1, + sym_number_string_literal, + STATE(274), 2, + sym_number_literal, + aux_sym_asm_function_body_repeat2, + [12268] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(905), 2, + anon_sym_SEMI, + anon_sym_inline, + ACTIONS(907), 3, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + [12281] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(69), 1, + anon_sym_DASH_GT, + ACTIONS(351), 2, + sym_identifier, + sym_underscore, + ACTIONS(909), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [12296] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(912), 2, + sym_identifier, + sym_underscore, + ACTIONS(914), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12309] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(916), 1, + anon_sym_RPAREN, + ACTIONS(884), 2, + aux_sym_number_literal_token1, + sym_number_string_literal, + STATE(265), 2, + sym_number_literal, + aux_sym_asm_function_body_repeat2, + [12324] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(80), 1, + anon_sym_DASH_GT, + ACTIONS(353), 2, + sym_identifier, + sym_underscore, + ACTIONS(918), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [12339] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 2, + anon_sym_SEMI, + anon_sym_inline, + ACTIONS(923), 3, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + [12352] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 2, + anon_sym_SEMI, + anon_sym_inline, + ACTIONS(923), 3, + sym_impure, + anon_sym_inline_ref, + anon_sym_method_id, + [12365] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(781), 1, + anon_sym_method_id, + ACTIONS(808), 1, + anon_sym_asm, + STATE(314), 1, + sym_method_id, + ACTIONS(806), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [12382] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(925), 1, + sym_string_literal, + STATE(391), 1, + sym_number_literal, + ACTIONS(387), 2, + aux_sym_number_literal_token1, + sym_number_string_literal, + [12396] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(927), 1, + anon_sym_COMMA, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + ACTIONS(930), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12410] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(932), 1, + sym_identifier, + ACTIONS(934), 1, + anon_sym_RPAREN, + ACTIONS(936), 1, + anon_sym_DASH_GT, + STATE(292), 1, + aux_sym_asm_function_body_repeat1, + [12426] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(938), 1, + sym_identifier, + ACTIONS(940), 1, + anon_sym_COMMA, + ACTIONS(942), 1, + anon_sym_RPAREN, + STATE(310), 1, + aux_sym_tensor_type_repeat1, + [12442] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(938), 1, + sym_identifier, + ACTIONS(940), 1, + anon_sym_COMMA, + ACTIONS(944), 1, + anon_sym_RBRACK, + STATE(318), 1, + aux_sym_tensor_type_repeat1, + [12458] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + sym_identifier, + ACTIONS(903), 1, + anon_sym_type, + STATE(357), 1, + sym_type_parameter, + STATE(377), 1, + sym_type_identifier, + [12474] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(783), 1, + anon_sym_asm, + ACTIONS(785), 1, + anon_sym_LBRACE, + STATE(231), 1, + sym_asm_function_body, + STATE(232), 1, + sym_block_statement, + [12490] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(946), 1, + anon_sym_COMMA, + ACTIONS(948), 1, + anon_sym_RPAREN, + STATE(312), 1, + aux_sym_parameter_list_repeat1, + STATE(313), 1, + aux_sym_parameter_list_relaxed_repeat1, + [12506] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(950), 2, + sym_identifier, + sym_underscore, + ACTIONS(952), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [12518] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(954), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + ACTIONS(956), 2, + anon_sym_method_id, + anon_sym_asm, + [12530] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(958), 1, + anon_sym_COMMA, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + ACTIONS(961), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12544] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(963), 1, + anon_sym_SEMI, + ACTIONS(965), 1, + anon_sym_COMMA, + ACTIONS(69), 2, + anon_sym_DASH_GT, + sym_identifier, + [12558] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(783), 1, + anon_sym_asm, + ACTIONS(785), 1, + anon_sym_LBRACE, + STATE(213), 1, + sym_asm_function_body, + STATE(237), 1, + sym_block_statement, + [12574] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(882), 1, + anon_sym_RPAREN, + ACTIONS(967), 1, + sym_identifier, + ACTIONS(969), 1, + anon_sym_DASH_GT, + STATE(294), 1, + aux_sym_asm_function_body_repeat1, + [12590] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(973), 1, + anon_sym_LPAREN, + ACTIONS(975), 1, + anon_sym_asm, + ACTIONS(971), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [12604] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(977), 1, + sym_identifier, + STATE(294), 1, + aux_sym_asm_function_body_repeat1, + ACTIONS(980), 2, + anon_sym_RPAREN, + anon_sym_DASH_GT, + [12618] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(982), 1, + anon_sym_COMMA, + STATE(295), 1, + aux_sym_tensor_type_repeat1, + ACTIONS(985), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12632] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(987), 1, + anon_sym_EQ, + ACTIONS(69), 2, + anon_sym_DASH_GT, + sym_identifier, + [12643] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(930), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12652] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(989), 1, + anon_sym_SEMI, + ACTIONS(991), 1, + sym_string_literal, + STATE(298), 1, + aux_sym_asm_function_body_repeat3, + [12665] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(994), 1, + anon_sym_SEMI, + ACTIONS(996), 1, + anon_sym_COMMA, + STATE(299), 1, + aux_sym_constant_declarations_repeat1, + [12678] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(999), 1, + anon_sym_SEMI, + ACTIONS(1001), 1, + anon_sym_COMMA, + STATE(330), 1, + aux_sym_global_var_declarations_repeat1, + [12691] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(397), 1, + anon_sym_COMMA, + ACTIONS(399), 1, + anon_sym_RPAREN, + STATE(324), 1, + aux_sym_tuple_vars_declaration_repeat1, + [12704] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(401), 1, + anon_sym_COMMA, + ACTIONS(403), 1, + anon_sym_RBRACK, + STATE(329), 1, + aux_sym_tuple_vars_declaration_repeat1, + [12717] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(961), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12726] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1003), 1, + anon_sym_SEMI, + ACTIONS(1005), 1, + anon_sym_COMMA, + STATE(299), 1, + aux_sym_constant_declarations_repeat1, + [12739] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(985), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [12748] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1007), 1, + anon_sym_LPAREN, + ACTIONS(1009), 1, + sym_string_literal, + STATE(315), 1, + aux_sym_asm_function_body_repeat3, + [12761] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1011), 1, + anon_sym_SEMI, + ACTIONS(1013), 1, + sym_string_literal, + STATE(298), 1, + aux_sym_asm_function_body_repeat3, + [12774] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1015), 1, + anon_sym_COMMA, + ACTIONS(1017), 1, + anon_sym_RPAREN, + STATE(349), 1, + aux_sym_parameter_list_relaxed_repeat1, + [12787] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1015), 1, + anon_sym_COMMA, + ACTIONS(1019), 1, + anon_sym_RPAREN, + STATE(349), 1, + aux_sym_parameter_list_relaxed_repeat1, + [12800] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(940), 1, + anon_sym_COMMA, + ACTIONS(1021), 1, + anon_sym_RPAREN, + STATE(295), 1, + aux_sym_tensor_type_repeat1, + [12813] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(940), 1, + anon_sym_COMMA, + ACTIONS(942), 1, + anon_sym_RPAREN, + STATE(310), 1, + aux_sym_tensor_type_repeat1, + [12826] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1023), 1, + anon_sym_COMMA, + ACTIONS(1025), 1, + anon_sym_RPAREN, + STATE(353), 1, + aux_sym_parameter_list_repeat1, + [12839] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1015), 1, + anon_sym_COMMA, + ACTIONS(1027), 1, + anon_sym_RPAREN, + STATE(349), 1, + aux_sym_parameter_list_relaxed_repeat1, + [12852] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(895), 1, + anon_sym_asm, + ACTIONS(893), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [12863] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + sym_string_literal, + ACTIONS(1029), 1, + anon_sym_SEMI, + STATE(298), 1, + aux_sym_asm_function_body_repeat3, + [12876] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(808), 1, + anon_sym_asm, + ACTIONS(806), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [12887] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1031), 1, + anon_sym_COMMA, + ACTIONS(1033), 1, + anon_sym_DASH_GT, + STATE(320), 1, + aux_sym_type_parameters_repeat1, + [12900] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(940), 1, + anon_sym_COMMA, + ACTIONS(1035), 1, + anon_sym_RBRACK, + STATE(295), 1, + aux_sym_tensor_type_repeat1, + [12913] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1037), 1, + anon_sym_LPAREN, + STATE(240), 1, + sym_parameter_list, + STATE(245), 1, + sym_parameter_list_relaxed, + [12926] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1039), 1, + anon_sym_COMMA, + ACTIONS(1042), 1, + anon_sym_DASH_GT, + STATE(320), 1, + aux_sym_type_parameters_repeat1, + [12939] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + sym_string_literal, + ACTIONS(1044), 1, + anon_sym_SEMI, + STATE(298), 1, + aux_sym_asm_function_body_repeat3, + [12952] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1048), 1, + anon_sym_RPAREN, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + [12965] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1052), 1, + anon_sym_asm, + ACTIONS(1050), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [12976] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1054), 1, + anon_sym_COMMA, + ACTIONS(1056), 1, + anon_sym_RPAREN, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + [12989] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + sym_string_literal, + ACTIONS(1058), 1, + anon_sym_SEMI, + STATE(298), 1, + aux_sym_asm_function_body_repeat3, + [13002] = 4, + ACTIONS(800), 1, + sym_comment, + ACTIONS(870), 1, + anon_sym_SPACE, + ACTIONS(1060), 1, + sym_version_identifier, + STATE(244), 1, + aux_sym_import_directive_repeat1, + [13015] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(195), 3, + anon_sym_RPAREN, + aux_sym_number_literal_token1, + sym_number_string_literal, + [13024] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1062), 1, + anon_sym_RBRACK, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + [13037] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1064), 1, + anon_sym_COMMA, + ACTIONS(1066), 1, + anon_sym_RBRACK, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + [13050] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1068), 1, + anon_sym_SEMI, + ACTIONS(1070), 1, + anon_sym_COMMA, + STATE(330), 1, + aux_sym_global_var_declarations_repeat1, + [13063] = 4, + ACTIONS(800), 1, + sym_comment, + ACTIONS(870), 1, + anon_sym_SPACE, + ACTIONS(1073), 1, + sym_string_literal, + STATE(244), 1, + aux_sym_import_directive_repeat1, + [13076] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1075), 1, + anon_sym_RPAREN, + STATE(335), 1, + aux_sym_tensor_expression_repeat1, + [13089] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1077), 1, + anon_sym_RBRACK, + STATE(337), 1, + aux_sym_tensor_expression_repeat1, + [13102] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1001), 1, + anon_sym_COMMA, + ACTIONS(1079), 1, + anon_sym_SEMI, + STATE(300), 1, + aux_sym_global_var_declarations_repeat1, + [13115] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1081), 1, + anon_sym_RPAREN, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + [13128] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1083), 1, + anon_sym_COMMA, + ACTIONS(1085), 1, + anon_sym_RPAREN, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + [13141] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1087), 1, + anon_sym_RBRACK, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + [13154] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1091), 1, + anon_sym_asm, + ACTIONS(1089), 2, + anon_sym_SEMI, + anon_sym_LBRACE, + [13165] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1093), 1, + anon_sym_COMMA, + ACTIONS(1095), 1, + anon_sym_RBRACK, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + [13178] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1005), 1, + anon_sym_COMMA, + ACTIONS(1097), 1, + anon_sym_SEMI, + STATE(304), 1, + aux_sym_constant_declarations_repeat1, + [13191] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(940), 1, + anon_sym_COMMA, + ACTIONS(944), 1, + anon_sym_RBRACK, + STATE(318), 1, + aux_sym_tensor_type_repeat1, + [13204] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1099), 1, + anon_sym_RPAREN, + STATE(322), 1, + aux_sym_tensor_expression_repeat1, + [13217] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1101), 1, + anon_sym_RPAREN, + STATE(345), 1, + aux_sym_tensor_expression_repeat1, + [13230] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1103), 1, + anon_sym_RBRACK, + STATE(348), 1, + aux_sym_tensor_expression_repeat1, + [13243] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1105), 1, + anon_sym_RPAREN, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + [13256] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1037), 1, + anon_sym_LPAREN, + STATE(242), 1, + sym_parameter_list, + STATE(246), 1, + sym_parameter_list_relaxed, + [13269] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1107), 1, + anon_sym_COMMA, + ACTIONS(1109), 1, + anon_sym_RPAREN, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + [13282] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1111), 1, + anon_sym_RBRACK, + STATE(280), 1, + aux_sym_tensor_expression_repeat1, + [13295] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1113), 1, + anon_sym_COMMA, + ACTIONS(1116), 1, + anon_sym_RPAREN, + STATE(349), 1, + aux_sym_parameter_list_relaxed_repeat1, + [13308] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1118), 1, + anon_sym_COMMA, + ACTIONS(1120), 1, + anon_sym_RBRACK, + STATE(289), 1, + aux_sym_tuple_vars_declaration_repeat1, + [13321] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1031), 1, + anon_sym_COMMA, + ACTIONS(1122), 1, + anon_sym_DASH_GT, + STATE(317), 1, + aux_sym_type_parameters_repeat1, + [13334] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1046), 1, + anon_sym_COMMA, + ACTIONS(1124), 1, + anon_sym_RBRACK, + STATE(328), 1, + aux_sym_tensor_expression_repeat1, + [13347] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1126), 1, + anon_sym_COMMA, + ACTIONS(1129), 1, + anon_sym_RPAREN, + STATE(353), 1, + aux_sym_parameter_list_repeat1, + [13360] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + sym_string_literal, + ACTIONS(1131), 1, + anon_sym_SEMI, + STATE(298), 1, + aux_sym_asm_function_body_repeat3, + [13373] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1133), 1, + sym_string_literal, + STATE(307), 1, + aux_sym_asm_function_body_repeat3, + [13383] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(99), 1, + anon_sym_LBRACE, + STATE(169), 1, + sym_block_statement, + [13393] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1042), 2, + anon_sym_COMMA, + anon_sym_DASH_GT, + [13401] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1135), 1, + anon_sym_catch, + STATE(176), 1, + sym_catch_clause, + [13411] = 3, + ACTIONS(800), 1, + sym_comment, + ACTIONS(1137), 1, + anon_sym_SPACE, + STATE(261), 1, + aux_sym_import_directive_repeat1, + [13421] = 3, + ACTIONS(800), 1, + sym_comment, + ACTIONS(1139), 1, + anon_sym_SPACE, + STATE(326), 1, + aux_sym_import_directive_repeat1, + [13431] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1141), 2, + anon_sym_COMMA, + anon_sym_DASH_GT, + [13439] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1143), 1, + sym_string_literal, + STATE(354), 1, + aux_sym_asm_function_body_repeat3, + [13449] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(99), 1, + anon_sym_LBRACE, + STATE(168), 1, + sym_block_statement, + [13459] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1145), 1, + anon_sym_SEMI, + ACTIONS(1147), 1, + anon_sym_COMMA, + [13469] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(785), 1, + anon_sym_LBRACE, + STATE(386), 1, + sym_block_statement, + [13479] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(99), 1, + anon_sym_LBRACE, + STATE(172), 1, + sym_block_statement, + [13489] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(785), 1, + anon_sym_LBRACE, + STATE(358), 1, + sym_block_statement, + [13499] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1149), 1, + sym_string_literal, + STATE(321), 1, + aux_sym_asm_function_body_repeat3, + [13509] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(994), 1, + anon_sym_SEMI, + ACTIONS(1151), 1, + anon_sym_COMMA, + [13519] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1153), 1, + anon_sym_SEMI, + ACTIONS(1155), 1, + anon_sym_COMMA, + [13529] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1157), 1, + sym_string_literal, + STATE(325), 1, + aux_sym_asm_function_body_repeat3, + [13539] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1159), 1, + sym_identifier, + STATE(361), 1, + sym_type_identifier, + [13549] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(99), 1, + anon_sym_LBRACE, + STATE(174), 1, + sym_block_statement, + [13559] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1161), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [13567] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1129), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [13575] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1163), 1, + anon_sym_SEMI, + ACTIONS(1165), 1, + anon_sym_COMMA, + [13585] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1167), 2, + anon_sym_COMMA, + anon_sym_DASH_GT, + [13593] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1169), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [13601] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1171), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [13609] = 3, + ACTIONS(800), 1, + sym_comment, + ACTIONS(1174), 1, + anon_sym_SPACE, + STATE(331), 1, + aux_sym_import_directive_repeat1, + [13619] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(99), 1, + anon_sym_LBRACE, + STATE(167), 1, + sym_block_statement, + [13629] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1068), 1, + anon_sym_SEMI, + ACTIONS(1176), 1, + anon_sym_COMMA, + [13639] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1178), 1, + ts_builtin_sym_end, + [13646] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1180), 1, + sym_identifier, + [13653] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1182), 1, + anon_sym_SEMI, + [13660] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1184), 1, + anon_sym_until, + [13667] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1186), 1, + sym_identifier, + [13674] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1188), 1, + sym_identifier, + [13681] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1190), 1, + anon_sym_EQ, + [13688] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(938), 1, + sym_identifier, + [13695] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1192), 1, + anon_sym_RPAREN, + [13702] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1194), 1, + anon_sym_COLON, + [13709] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1196), 1, + anon_sym_COLON, + [13716] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1198), 1, + sym_identifier, + [13723] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1200), 1, + sym_identifier, + [13730] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1202), 1, + anon_sym_SEMI, + [13737] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1204), 1, + sym_identifier, + [13744] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1206), 1, + anon_sym_SEMI, + [13751] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1208), 1, + sym_identifier, + [13758] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1210), 1, + sym_identifier, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(38)] = 0, + [SMALL_STATE(39)] = 72, + [SMALL_STATE(40)] = 140, + [SMALL_STATE(41)] = 212, + [SMALL_STATE(42)] = 284, + [SMALL_STATE(43)] = 356, + [SMALL_STATE(44)] = 428, + [SMALL_STATE(45)] = 495, + [SMALL_STATE(46)] = 564, + [SMALL_STATE(47)] = 633, + [SMALL_STATE(48)] = 702, + [SMALL_STATE(49)] = 771, + [SMALL_STATE(50)] = 840, + [SMALL_STATE(51)] = 909, + [SMALL_STATE(52)] = 974, + [SMALL_STATE(53)] = 1037, + [SMALL_STATE(54)] = 1102, + [SMALL_STATE(55)] = 1165, + [SMALL_STATE(56)] = 1225, + [SMALL_STATE(57)] = 1291, + [SMALL_STATE(58)] = 1351, + [SMALL_STATE(59)] = 1411, + [SMALL_STATE(60)] = 1471, + [SMALL_STATE(61)] = 1531, + [SMALL_STATE(62)] = 1597, + [SMALL_STATE(63)] = 1657, + [SMALL_STATE(64)] = 1717, + [SMALL_STATE(65)] = 1777, + [SMALL_STATE(66)] = 1837, + [SMALL_STATE(67)] = 1897, + [SMALL_STATE(68)] = 1957, + [SMALL_STATE(69)] = 2021, + [SMALL_STATE(70)] = 2085, + [SMALL_STATE(71)] = 2145, + [SMALL_STATE(72)] = 2205, + [SMALL_STATE(73)] = 2265, + [SMALL_STATE(74)] = 2329, + [SMALL_STATE(75)] = 2393, + [SMALL_STATE(76)] = 2457, + [SMALL_STATE(77)] = 2517, + [SMALL_STATE(78)] = 2577, + [SMALL_STATE(79)] = 2643, + [SMALL_STATE(80)] = 2701, + [SMALL_STATE(81)] = 2759, + [SMALL_STATE(82)] = 2817, + [SMALL_STATE(83)] = 2875, + [SMALL_STATE(84)] = 2933, + [SMALL_STATE(85)] = 2991, + [SMALL_STATE(86)] = 3049, + [SMALL_STATE(87)] = 3107, + [SMALL_STATE(88)] = 3165, + [SMALL_STATE(89)] = 3223, + [SMALL_STATE(90)] = 3281, + [SMALL_STATE(91)] = 3339, + [SMALL_STATE(92)] = 3397, + [SMALL_STATE(93)] = 3461, + [SMALL_STATE(94)] = 3525, + [SMALL_STATE(95)] = 3583, + [SMALL_STATE(96)] = 3641, + [SMALL_STATE(97)] = 3747, + [SMALL_STATE(98)] = 3805, + [SMALL_STATE(99)] = 3868, + [SMALL_STATE(100)] = 3931, + [SMALL_STATE(101)] = 4034, + [SMALL_STATE(102)] = 4097, + [SMALL_STATE(103)] = 4160, + [SMALL_STATE(104)] = 4263, + [SMALL_STATE(105)] = 4366, + [SMALL_STATE(106)] = 4469, + [SMALL_STATE(107)] = 4526, + [SMALL_STATE(108)] = 4589, + [SMALL_STATE(109)] = 4652, + [SMALL_STATE(110)] = 4755, + [SMALL_STATE(111)] = 4858, + [SMALL_STATE(112)] = 4921, + [SMALL_STATE(113)] = 4984, + [SMALL_STATE(114)] = 5087, + [SMALL_STATE(115)] = 5190, + [SMALL_STATE(116)] = 5293, + [SMALL_STATE(117)] = 5356, + [SMALL_STATE(118)] = 5459, + [SMALL_STATE(119)] = 5562, + [SMALL_STATE(120)] = 5665, + [SMALL_STATE(121)] = 5721, + [SMALL_STATE(122)] = 5819, + [SMALL_STATE(123)] = 5875, + [SMALL_STATE(124)] = 5975, + [SMALL_STATE(125)] = 6075, + [SMALL_STATE(126)] = 6175, + [SMALL_STATE(127)] = 6231, + [SMALL_STATE(128)] = 6331, + [SMALL_STATE(129)] = 6431, + [SMALL_STATE(130)] = 6531, + [SMALL_STATE(131)] = 6631, + [SMALL_STATE(132)] = 6731, + [SMALL_STATE(133)] = 6830, + [SMALL_STATE(134)] = 6927, + [SMALL_STATE(135)] = 7023, + [SMALL_STATE(136)] = 7117, + [SMALL_STATE(137)] = 7172, + [SMALL_STATE(138)] = 7262, + [SMALL_STATE(139)] = 7350, + [SMALL_STATE(140)] = 7404, + [SMALL_STATE(141)] = 7489, + [SMALL_STATE(142)] = 7576, + [SMALL_STATE(143)] = 7657, + [SMALL_STATE(144)] = 7738, + [SMALL_STATE(145)] = 7817, + [SMALL_STATE(146)] = 7896, + [SMALL_STATE(147)] = 7948, + [SMALL_STATE(148)] = 8000, + [SMALL_STATE(149)] = 8078, + [SMALL_STATE(150)] = 8130, + [SMALL_STATE(151)] = 8206, + [SMALL_STATE(152)] = 8258, + [SMALL_STATE(153)] = 8310, + [SMALL_STATE(154)] = 8357, + [SMALL_STATE(155)] = 8431, + [SMALL_STATE(156)] = 8503, + [SMALL_STATE(157)] = 8551, + [SMALL_STATE(158)] = 8599, + [SMALL_STATE(159)] = 8673, + [SMALL_STATE(160)] = 8747, + [SMALL_STATE(161)] = 8795, + [SMALL_STATE(162)] = 8862, + [SMALL_STATE(163)] = 8929, + [SMALL_STATE(164)] = 8968, + [SMALL_STATE(165)] = 9011, + [SMALL_STATE(166)] = 9049, + [SMALL_STATE(167)] = 9087, + [SMALL_STATE(168)] = 9129, + [SMALL_STATE(169)] = 9164, + [SMALL_STATE(170)] = 9199, + [SMALL_STATE(171)] = 9234, + [SMALL_STATE(172)] = 9269, + [SMALL_STATE(173)] = 9304, + [SMALL_STATE(174)] = 9339, + [SMALL_STATE(175)] = 9374, + [SMALL_STATE(176)] = 9409, + [SMALL_STATE(177)] = 9444, + [SMALL_STATE(178)] = 9479, + [SMALL_STATE(179)] = 9514, + [SMALL_STATE(180)] = 9551, + [SMALL_STATE(181)] = 9586, + [SMALL_STATE(182)] = 9635, + [SMALL_STATE(183)] = 9684, + [SMALL_STATE(184)] = 9733, + [SMALL_STATE(185)] = 9782, + [SMALL_STATE(186)] = 9831, + [SMALL_STATE(187)] = 9880, + [SMALL_STATE(188)] = 9929, + [SMALL_STATE(189)] = 9978, + [SMALL_STATE(190)] = 10027, + [SMALL_STATE(191)] = 10076, + [SMALL_STATE(192)] = 10125, + [SMALL_STATE(193)] = 10174, + [SMALL_STATE(194)] = 10223, + [SMALL_STATE(195)] = 10272, + [SMALL_STATE(196)] = 10318, + [SMALL_STATE(197)] = 10352, + [SMALL_STATE(198)] = 10385, + [SMALL_STATE(199)] = 10431, + [SMALL_STATE(200)] = 10474, + [SMALL_STATE(201)] = 10517, + [SMALL_STATE(202)] = 10560, + [SMALL_STATE(203)] = 10603, + [SMALL_STATE(204)] = 10646, + [SMALL_STATE(205)] = 10689, + [SMALL_STATE(206)] = 10732, + [SMALL_STATE(207)] = 10775, + [SMALL_STATE(208)] = 10818, + [SMALL_STATE(209)] = 10858, + [SMALL_STATE(210)] = 10898, + [SMALL_STATE(211)] = 10926, + [SMALL_STATE(212)] = 10954, + [SMALL_STATE(213)] = 10994, + [SMALL_STATE(214)] = 11020, + [SMALL_STATE(215)] = 11046, + [SMALL_STATE(216)] = 11072, + [SMALL_STATE(217)] = 11098, + [SMALL_STATE(218)] = 11124, + [SMALL_STATE(219)] = 11150, + [SMALL_STATE(220)] = 11176, + [SMALL_STATE(221)] = 11202, + [SMALL_STATE(222)] = 11228, + [SMALL_STATE(223)] = 11254, + [SMALL_STATE(224)] = 11280, + [SMALL_STATE(225)] = 11306, + [SMALL_STATE(226)] = 11334, + [SMALL_STATE(227)] = 11360, + [SMALL_STATE(228)] = 11386, + [SMALL_STATE(229)] = 11412, + [SMALL_STATE(230)] = 11438, + [SMALL_STATE(231)] = 11464, + [SMALL_STATE(232)] = 11490, + [SMALL_STATE(233)] = 11516, + [SMALL_STATE(234)] = 11542, + [SMALL_STATE(235)] = 11568, + [SMALL_STATE(236)] = 11594, + [SMALL_STATE(237)] = 11620, + [SMALL_STATE(238)] = 11646, + [SMALL_STATE(239)] = 11672, + [SMALL_STATE(240)] = 11691, + [SMALL_STATE(241)] = 11728, + [SMALL_STATE(242)] = 11747, + [SMALL_STATE(243)] = 11784, + [SMALL_STATE(244)] = 11803, + [SMALL_STATE(245)] = 11821, + [SMALL_STATE(246)] = 11849, + [SMALL_STATE(247)] = 11877, + [SMALL_STATE(248)] = 11903, + [SMALL_STATE(249)] = 11924, + [SMALL_STATE(250)] = 11945, + [SMALL_STATE(251)] = 11959, + [SMALL_STATE(252)] = 11973, + [SMALL_STATE(253)] = 11987, + [SMALL_STATE(254)] = 12001, + [SMALL_STATE(255)] = 12015, + [SMALL_STATE(256)] = 12029, + [SMALL_STATE(257)] = 12043, + [SMALL_STATE(258)] = 12063, + [SMALL_STATE(259)] = 12077, + [SMALL_STATE(260)] = 12091, + [SMALL_STATE(261)] = 12107, + [SMALL_STATE(262)] = 12125, + [SMALL_STATE(263)] = 12145, + [SMALL_STATE(264)] = 12159, + [SMALL_STATE(265)] = 12174, + [SMALL_STATE(266)] = 12189, + [SMALL_STATE(267)] = 12204, + [SMALL_STATE(268)] = 12221, + [SMALL_STATE(269)] = 12234, + [SMALL_STATE(270)] = 12253, + [SMALL_STATE(271)] = 12268, + [SMALL_STATE(272)] = 12281, + [SMALL_STATE(273)] = 12296, + [SMALL_STATE(274)] = 12309, + [SMALL_STATE(275)] = 12324, + [SMALL_STATE(276)] = 12339, + [SMALL_STATE(277)] = 12352, + [SMALL_STATE(278)] = 12365, + [SMALL_STATE(279)] = 12382, + [SMALL_STATE(280)] = 12396, + [SMALL_STATE(281)] = 12410, + [SMALL_STATE(282)] = 12426, + [SMALL_STATE(283)] = 12442, + [SMALL_STATE(284)] = 12458, + [SMALL_STATE(285)] = 12474, + [SMALL_STATE(286)] = 12490, + [SMALL_STATE(287)] = 12506, + [SMALL_STATE(288)] = 12518, + [SMALL_STATE(289)] = 12530, + [SMALL_STATE(290)] = 12544, + [SMALL_STATE(291)] = 12558, + [SMALL_STATE(292)] = 12574, + [SMALL_STATE(293)] = 12590, + [SMALL_STATE(294)] = 12604, + [SMALL_STATE(295)] = 12618, + [SMALL_STATE(296)] = 12632, + [SMALL_STATE(297)] = 12643, + [SMALL_STATE(298)] = 12652, + [SMALL_STATE(299)] = 12665, + [SMALL_STATE(300)] = 12678, + [SMALL_STATE(301)] = 12691, + [SMALL_STATE(302)] = 12704, + [SMALL_STATE(303)] = 12717, + [SMALL_STATE(304)] = 12726, + [SMALL_STATE(305)] = 12739, + [SMALL_STATE(306)] = 12748, + [SMALL_STATE(307)] = 12761, + [SMALL_STATE(308)] = 12774, + [SMALL_STATE(309)] = 12787, + [SMALL_STATE(310)] = 12800, + [SMALL_STATE(311)] = 12813, + [SMALL_STATE(312)] = 12826, + [SMALL_STATE(313)] = 12839, + [SMALL_STATE(314)] = 12852, + [SMALL_STATE(315)] = 12863, + [SMALL_STATE(316)] = 12876, + [SMALL_STATE(317)] = 12887, + [SMALL_STATE(318)] = 12900, + [SMALL_STATE(319)] = 12913, + [SMALL_STATE(320)] = 12926, + [SMALL_STATE(321)] = 12939, + [SMALL_STATE(322)] = 12952, + [SMALL_STATE(323)] = 12965, + [SMALL_STATE(324)] = 12976, + [SMALL_STATE(325)] = 12989, + [SMALL_STATE(326)] = 13002, + [SMALL_STATE(327)] = 13015, + [SMALL_STATE(328)] = 13024, + [SMALL_STATE(329)] = 13037, + [SMALL_STATE(330)] = 13050, + [SMALL_STATE(331)] = 13063, + [SMALL_STATE(332)] = 13076, + [SMALL_STATE(333)] = 13089, + [SMALL_STATE(334)] = 13102, + [SMALL_STATE(335)] = 13115, + [SMALL_STATE(336)] = 13128, + [SMALL_STATE(337)] = 13141, + [SMALL_STATE(338)] = 13154, + [SMALL_STATE(339)] = 13165, + [SMALL_STATE(340)] = 13178, + [SMALL_STATE(341)] = 13191, + [SMALL_STATE(342)] = 13204, + [SMALL_STATE(343)] = 13217, + [SMALL_STATE(344)] = 13230, + [SMALL_STATE(345)] = 13243, + [SMALL_STATE(346)] = 13256, + [SMALL_STATE(347)] = 13269, + [SMALL_STATE(348)] = 13282, + [SMALL_STATE(349)] = 13295, + [SMALL_STATE(350)] = 13308, + [SMALL_STATE(351)] = 13321, + [SMALL_STATE(352)] = 13334, + [SMALL_STATE(353)] = 13347, + [SMALL_STATE(354)] = 13360, + [SMALL_STATE(355)] = 13373, + [SMALL_STATE(356)] = 13383, + [SMALL_STATE(357)] = 13393, + [SMALL_STATE(358)] = 13401, + [SMALL_STATE(359)] = 13411, + [SMALL_STATE(360)] = 13421, + [SMALL_STATE(361)] = 13431, + [SMALL_STATE(362)] = 13439, + [SMALL_STATE(363)] = 13449, + [SMALL_STATE(364)] = 13459, + [SMALL_STATE(365)] = 13469, + [SMALL_STATE(366)] = 13479, + [SMALL_STATE(367)] = 13489, + [SMALL_STATE(368)] = 13499, + [SMALL_STATE(369)] = 13509, + [SMALL_STATE(370)] = 13519, + [SMALL_STATE(371)] = 13529, + [SMALL_STATE(372)] = 13539, + [SMALL_STATE(373)] = 13549, + [SMALL_STATE(374)] = 13559, + [SMALL_STATE(375)] = 13567, + [SMALL_STATE(376)] = 13575, + [SMALL_STATE(377)] = 13585, + [SMALL_STATE(378)] = 13593, + [SMALL_STATE(379)] = 13601, + [SMALL_STATE(380)] = 13609, + [SMALL_STATE(381)] = 13619, + [SMALL_STATE(382)] = 13629, + [SMALL_STATE(383)] = 13639, + [SMALL_STATE(384)] = 13646, + [SMALL_STATE(385)] = 13653, + [SMALL_STATE(386)] = 13660, + [SMALL_STATE(387)] = 13667, + [SMALL_STATE(388)] = 13674, + [SMALL_STATE(389)] = 13681, + [SMALL_STATE(390)] = 13688, + [SMALL_STATE(391)] = 13695, + [SMALL_STATE(392)] = 13702, + [SMALL_STATE(393)] = 13709, + [SMALL_STATE(394)] = 13716, + [SMALL_STATE(395)] = 13723, + [SMALL_STATE(396)] = 13730, + [SMALL_STATE(397)] = 13737, + [SMALL_STATE(398)] = 13744, + [SMALL_STATE(399)] = 13751, + [SMALL_STATE(400)] = 13758, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(255), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(380), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(234), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(359), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(202), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(200), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(269), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(207), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(254), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(260), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(256), + [31] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_application, 2, 0, 17), + [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_application, 2, 0, 17), + [35] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_function_application_repeat1, 2, 0, 0), SHIFT_REPEAT(3), + [38] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_function_application_repeat1, 2, 0, 0), + [40] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_application_repeat1, 2, 0, 0), SHIFT_REPEAT(113), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_application_repeat1, 2, 0, 0), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr80, 2, 0, 0), + [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr80, 2, 0, 0), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(399), + [51] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr80_repeat1, 2, 0, 0), + [53] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr80_repeat1, 2, 0, 0), + [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr80_repeat1, 2, 0, 0), SHIFT_REPEAT(399), + [58] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr80_repeat1, 2, 0, 0), SHIFT_REPEAT(399), + [61] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr80, 1, 0, 0), + [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr80, 1, 0, 0), + [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__nontype_expr100, 1, 0, 0), + [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__nontype_expr100, 1, 0, 0), + [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_identifier, 1, 0, 1), + [71] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_typed_tuple, 2, 0, 0), REDUCE(sym_tuple_type, 2, 0, 0), + [74] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_typed_tuple, 2, 0, 0), + [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typed_tuple, 2, 0, 0), + [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_type, 2, 0, 0), + [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hole_type, 1, 0, 2), + [82] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_tensor_expression, 2, 0, 0), REDUCE(sym_tensor_type, 2, 0, 0), + [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_expression, 2, 0, 0), + [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_expression, 2, 0, 0), + [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_type, 2, 0, 0), + [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(173), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), + [103] = {.entry = {.count = 1, .reusable = false}}, SHIFT(127), + [105] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), + [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(365), + [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(129), + [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(367), + [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(145), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), + [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [127] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), + [131] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(7), + [134] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(173), + [137] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(114), + [140] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(124), + [143] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(34), + [146] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), + [148] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(127), + [151] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(104), + [154] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(365), + [157] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(129), + [160] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(367), + [163] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(145), + [166] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(155), + [169] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(115), + [172] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(254), + [175] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(260), + [178] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(14), + [181] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(6), + [184] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(14), + [187] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(6), + [190] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(9), + [193] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_number_literal, 1, 0, 0), + [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_number_literal, 1, 0, 0), + [197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr30, 1, 0, 0), + [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr30, 1, 0, 0), + [201] = {.entry = {.count = 1, .reusable = false}}, SHIFT(150), + [203] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_vars_declaration, 1, 90, 11), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_vars_declaration, 1, 90, 11), + [209] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr30, 2, 0, 0), + [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr30, 2, 0, 0), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_var_declaration, 2, 0, 7), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_var_declaration, 2, 0, 7), + [217] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_vars_declaration, 3, 0, 25), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_vars_declaration, 3, 0, 25), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_typed_tuple, 3, 0, 0), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typed_tuple, 3, 0, 0), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_vars_declaration, 3, 0, 25), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_vars_declaration, 3, 0, 25), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr30_repeat1, 2, 0, 0), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr30_repeat1, 2, 0, 0), + [237] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr30_repeat1, 2, 0, 0), SHIFT_REPEAT(150), + [240] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr30_repeat1, 2, 0, 0), SHIFT_REPEAT(150), + [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_expression, 4, 0, 0), + [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_expression, 4, 0, 0), + [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_vars_declaration, 4, 0, 25), + [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_vars_declaration, 4, 0, 25), + [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_vars_declaration, 4, 0, 33), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_vars_declaration, 4, 0, 33), + [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_typed_tuple, 4, 0, 0), + [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_typed_tuple, 4, 0, 0), + [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_vars_declaration, 4, 0, 25), + [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_vars_declaration, 4, 0, 25), + [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_vars_declaration, 4, 0, 33), + [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_vars_declaration, 4, 0, 33), + [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_method_call, 3, 0, 34), + [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_call, 3, 0, 34), + [271] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_vars_declaration, 5, 0, 33), + [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_vars_declaration, 5, 0, 33), + [275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_vars_declaration, 5, 0, 33), + [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_vars_declaration, 5, 0, 33), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [283] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr75, 2, 0, 0), + [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr75, 2, 0, 0), + [287] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr20_repeat1, 2, 0, 0), + [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr20_repeat1, 2, 0, 0), + [291] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr20_repeat1, 2, 0, 0), SHIFT_REPEAT(144), + [294] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__expr17_repeat1, 2, 0, 0), + [296] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__expr17_repeat1, 2, 0, 0), + [298] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr20, 1, 0, 0), + [300] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr20, 1, 0, 0), + [302] = {.entry = {.count = 1, .reusable = false}}, SHIFT(144), + [304] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr20, 2, 0, 0), + [306] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr20, 2, 0, 0), + [308] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr20, 3, 0, 0), + [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr20, 3, 0, 0), + [312] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr17, 2, 0, 0), + [314] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr17, 2, 0, 0), + [316] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), + [318] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr17_repeat1, 2, 0, 0), SHIFT_REPEAT(140), + [321] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr17, 1, 0, 0), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr17, 1, 0, 0), + [325] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [329] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_function_application_repeat1, 2, 0, 0), SHIFT_REPEAT(49), + [332] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_application_repeat1, 2, 0, 0), SHIFT_REPEAT(103), + [335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [337] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr100, 1, 0, 0), + [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr100, 1, 0, 0), + [341] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr80_repeat1, 2, 0, 0), SHIFT_REPEAT(388), + [344] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr80_repeat1, 2, 0, 0), SHIFT_REPEAT(388), + [347] = {.entry = {.count = 1, .reusable = false}}, SHIFT(388), + [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(388), + [351] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_identifier, 1, 0, 1), + [353] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_hole_type, 1, 0, 2), + [355] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_type, 2, 0, 0), + [357] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_type, 2, 0, 0), + [359] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr15, 1, 0, 0), + [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr15, 1, 0, 0), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [365] = {.entry = {.count = 1, .reusable = false}}, SHIFT(138), + [367] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_typed_tuple, 2, 0, 0), REDUCE(sym_tuple_type, 2, 0, 0), + [370] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_tensor_expression, 2, 0, 0), REDUCE(sym_tensor_type, 2, 0, 0), + [373] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [377] = {.entry = {.count = 1, .reusable = false}}, SHIFT(142), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [381] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [383] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [385] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), + [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [391] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), + [393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(189), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [405] = {.entry = {.count = 1, .reusable = false}}, SHIFT(148), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [417] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr15, 3, 0, 0), + [419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr15, 3, 0, 0), + [421] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr30_repeat1, 2, 0, 0), SHIFT_REPEAT(148), + [424] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__expr30_repeat1, 2, 0, 0), SHIFT_REPEAT(148), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [455] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr13, 5, 0, 0), + [457] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr13, 5, 0, 0), + [459] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr13, 1, 0, 0), + [461] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr13, 1, 0, 0), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [465] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr10, 1, 0, 0), + [467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), + [469] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr10, 1, 0, 0), + [471] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr20_repeat1, 2, 0, 0), SHIFT_REPEAT(143), + [474] = {.entry = {.count = 1, .reusable = false}}, SHIFT(143), + [476] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__expr17_repeat1, 2, 0, 0), SHIFT_REPEAT(141), + [479] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [483] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [485] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(255), + [488] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(380), + [491] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(234), + [494] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(359), + [497] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(202), + [500] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(200), + [503] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(204), + [506] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(269), + [509] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(207), + [512] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(254), + [515] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(260), + [518] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(256), + [521] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [523] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [527] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), + [529] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), + [531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [535] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [537] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [539] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [541] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expr10, 3, 0, 0), + [543] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr10, 3, 0, 0), + [545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [547] = {.entry = {.count = 1, .reusable = false}}, SHIFT(137), + [549] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block_statement, 3, 0, 0), + [551] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block_statement, 3, 0, 0), + [553] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block_statement, 2, 0, 0), + [555] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block_statement, 2, 0, 0), + [557] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__if_statement_contents, 2, 0, 37), + [559] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__if_statement_contents, 2, 0, 37), + [561] = {.entry = {.count = 1, .reusable = false}}, SHIFT(356), + [563] = {.entry = {.count = 1, .reusable = false}}, SHIFT(100), + [565] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 3, 0, 36), + [567] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 3, 0, 36), + [569] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__if_statement_contents, 4, 0, 42), + [571] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__if_statement_contents, 4, 0, 42), + [573] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 2, 0, 32), + [575] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 2, 0, 32), + [577] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_statement, 2, 0, 0), + [579] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 2, 0, 0), + [581] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_catch_clause, 3, 0, 44), + [583] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_catch_clause, 3, 0, 44), + [585] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_empty_statement, 1, 0, 0), + [587] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_empty_statement, 1, 0, 0), + [589] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 3, 0, 38), + [591] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 3, 0, 38), + [593] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 3, 0, 0), + [595] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 3, 0, 0), + [597] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_try_catch_statement, 3, 0, 39), + [599] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_try_catch_statement, 3, 0, 39), + [601] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_while_statement, 4, 0, 40), + [603] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_while_statement, 4, 0, 40), + [605] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_catch_clause, 2, 0, 41), + [607] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_catch_clause, 2, 0, 41), + [609] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression_statement, 1, 0, 0), + [611] = {.entry = {.count = 1, .reusable = false}}, SHIFT(171), + [613] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_statement, 1, 0, 0), + [615] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__if_statement_contents, 4, 0, 43), + [617] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__if_statement_contents, 4, 0, 43), + [619] = {.entry = {.count = 1, .reusable = true}}, SHIFT(183), + [621] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [623] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [625] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [627] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), + [629] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [631] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [633] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [635] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [637] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [639] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [641] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [643] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [645] = {.entry = {.count = 1, .reusable = true}}, SHIFT(250), + [647] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [649] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [651] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [653] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [655] = {.entry = {.count = 1, .reusable = false}}, SHIFT(257), + [657] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [659] = {.entry = {.count = 1, .reusable = false}}, SHIFT(262), + [661] = {.entry = {.count = 1, .reusable = false}}, SHIFT(296), + [663] = {.entry = {.count = 1, .reusable = false}}, SHIFT(290), + [665] = {.entry = {.count = 1, .reusable = false}}, SHIFT(272), + [667] = {.entry = {.count = 1, .reusable = false}}, SHIFT(275), + [669] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, 0, 26), + [671] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, 0, 26), + [673] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, 0, 28), + [675] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, 0, 28), + [677] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asm_function_body, 3, 0, 0), + [679] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asm_function_body, 3, 0, 0), + [681] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constant_declarations, 4, 0, 9), + [683] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constant_declarations, 4, 0, 9), + [685] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asm_function_body, 5, 0, 0), + [687] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asm_function_body, 5, 0, 0), + [689] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asm_function_body, 6, 0, 0), + [691] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asm_function_body, 6, 0, 0), + [693] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, 0, 13), + [695] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 4, 0, 13), + [697] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, 0, 14), + [699] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 4, 0, 14), + [701] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asm_function_body, 7, 0, 0), + [703] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asm_function_body, 7, 0, 0), + [705] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_asm_function_body, 8, 0, 0), + [707] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_asm_function_body, 8, 0, 0), + [709] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, 0, 15), + [711] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 4, 0, 15), + [713] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pragma_directive, 5, 0, 16), + [715] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pragma_directive, 5, 0, 16), + [717] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_directive, 3, 0, 4), + [719] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_directive, 3, 0, 4), + [721] = {.entry = {.count = 1, .reusable = false}}, SHIFT(235), + [723] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_pragma_directive, 3, 0, 5), + [725] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_pragma_directive, 3, 0, 5), + [727] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constant_declarations, 3, 0, 6), + [729] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constant_declarations, 3, 0, 6), + [731] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, 0, 19), + [733] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, 0, 19), + [735] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, 0, 20), + [737] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, 0, 20), + [739] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, 0, 21), + [741] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, 0, 21), + [743] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, 0, 22), + [745] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, 0, 22), + [747] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, 0, 23), + [749] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, 0, 23), + [751] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, 0, 24), + [753] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, 0, 24), + [755] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_directive, 4, 0, 4), + [757] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_directive, 4, 0, 4), + [759] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_var_declarations, 4, 0, 9), + [761] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_global_var_declarations, 4, 0, 9), + [763] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, 0, 27), + [765] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, 0, 27), + [767] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_var_declarations, 3, 0, 6), + [769] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_global_var_declarations, 3, 0, 6), + [771] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_parameters, 4, 0, 0), + [773] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameters, 4, 0, 0), + [775] = {.entry = {.count = 1, .reusable = true}}, SHIFT(247), + [777] = {.entry = {.count = 1, .reusable = false}}, SHIFT(288), + [779] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [781] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [783] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [785] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), + [787] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_parameters, 2, 0, 0), + [789] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameters, 2, 0, 0), + [791] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_parameters, 3, 0, 0), + [793] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameters, 3, 0, 0), + [795] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_import_directive_repeat1, 2, 0, 0), SHIFT_REPEAT(244), + [798] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_import_directive_repeat1, 2, 0, 0), + [800] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [802] = {.entry = {.count = 1, .reusable = false}}, SHIFT(230), + [804] = {.entry = {.count = 1, .reusable = false}}, SHIFT(223), + [806] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_specifiers_list, 1, 0, 0), + [808] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_specifiers_list, 1, 0, 0), + [810] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list_relaxed, 2, 0, 0), + [812] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_parameter_list, 2, 0, 0), REDUCE(sym_parameter_list_relaxed, 2, 0, 0), + [815] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_parameter_list, 2, 0, 0), REDUCE(sym_parameter_list_relaxed, 2, 0, 0), + [818] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 2, 0, 0), + [820] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 2, 0, 0), + [822] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list_relaxed, 3, 0, 0), + [824] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_parameter_list, 3, 0, 0), REDUCE(sym_parameter_list_relaxed, 3, 0, 0), + [827] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_parameter_list, 3, 0, 0), REDUCE(sym_parameter_list_relaxed, 3, 0, 0), + [830] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 3, 0, 0), + [832] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 3, 0, 0), + [834] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list, 4, 0, 0), + [836] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list, 4, 0, 0), + [838] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_type, 4, 0, 0), + [840] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_type, 4, 0, 0), + [842] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tensor_type, 4, 0, 0), + [844] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tensor_type, 4, 0, 0), + [846] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primitive_type, 1, 0, 0), + [848] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_type, 1, 0, 0), + [850] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_type_identifier, 1, 0, 1), SHIFT(203), + [853] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_type_identifier, 1, 0, 1), SHIFT(268), + [856] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__parenthesized_type, 3, 0, 0), + [858] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parenthesized_type, 3, 0, 0), + [860] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_type, 3, 0, 0), + [862] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple_type, 3, 0, 0), + [864] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_hint, 1, 0, 0), + [866] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__type_hint, 1, 0, 0), + [868] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [870] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), + [872] = {.entry = {.count = 1, .reusable = false}}, SHIFT(360), + [874] = {.entry = {.count = 1, .reusable = false}}, SHIFT(226), + [876] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_hole_type, 1, 0, 2), SHIFT(203), + [879] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_hole_type, 1, 0, 2), SHIFT(268), + [882] = {.entry = {.count = 1, .reusable = true}}, SHIFT(355), + [884] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), + [886] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asm_function_body_repeat2, 2, 0, 0), + [888] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asm_function_body_repeat2, 2, 0, 0), SHIFT_REPEAT(327), + [891] = {.entry = {.count = 1, .reusable = true}}, SHIFT(368), + [893] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_specifiers_list, 2, 0, 0), + [895] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_specifiers_list, 2, 0, 0), + [897] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list_relaxed, 3, 0, 8), + [899] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list_relaxed, 3, 0, 8), + [901] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), + [903] = {.entry = {.count = 1, .reusable = false}}, SHIFT(372), + [905] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list_relaxed, 4, 0, 31), + [907] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list_relaxed, 4, 0, 31), + [909] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_type_identifier, 1, 0, 1), REDUCE(aux_sym_parameter_list_relaxed_repeat1, 2, 0, 8), + [912] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_type, 3, 0, 0), + [914] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_type, 3, 0, 0), + [916] = {.entry = {.count = 1, .reusable = true}}, SHIFT(371), + [918] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_hole_type, 1, 0, 2), REDUCE(aux_sym_parameter_list_relaxed_repeat1, 2, 0, 8), + [921] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameter_list_relaxed, 4, 0, 29), + [923] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_list_relaxed, 4, 0, 29), + [925] = {.entry = {.count = 1, .reusable = false}}, SHIFT(391), + [927] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_tensor_expression_repeat1, 2, 0, 0), SHIFT_REPEAT(128), + [930] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_tensor_expression_repeat1, 2, 0, 0), + [932] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [934] = {.entry = {.count = 1, .reusable = true}}, SHIFT(362), + [936] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [938] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [940] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [942] = {.entry = {.count = 1, .reusable = true}}, SHIFT(258), + [944] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [946] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [948] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), + [950] = {.entry = {.count = 1, .reusable = false}}, SHIFT(378), + [952] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_declaration, 1, 0, 12), + [954] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_inline, 1, 0, 0), + [956] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_inline, 1, 0, 0), + [958] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_tuple_vars_declaration_repeat1, 2, 0, 0), SHIFT_REPEAT(195), + [961] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_tuple_vars_declaration_repeat1, 2, 0, 0), + [963] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_global_var_declaration, 1, 0, 3), + [965] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_var_declaration, 1, 0, 3), + [967] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [969] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [971] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_method_id, 1, 0, 0), + [973] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [975] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_id, 1, 0, 0), + [977] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asm_function_body_repeat1, 2, 0, 0), SHIFT_REPEAT(294), + [980] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_asm_function_body_repeat1, 2, 0, 0), + [982] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_tensor_type_repeat1, 2, 0, 0), SHIFT_REPEAT(208), + [985] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_tensor_type_repeat1, 2, 0, 0), + [987] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [989] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_asm_function_body_repeat3, 2, 0, 0), + [991] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_asm_function_body_repeat3, 2, 0, 0), SHIFT_REPEAT(298), + [994] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_constant_declarations_repeat1, 2, 0, 0), + [996] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_constant_declarations_repeat1, 2, 0, 0), SHIFT_REPEAT(199), + [999] = {.entry = {.count = 1, .reusable = false}}, SHIFT(236), + [1001] = {.entry = {.count = 1, .reusable = true}}, SHIFT(206), + [1003] = {.entry = {.count = 1, .reusable = false}}, SHIFT(216), + [1005] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [1007] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), + [1009] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [1011] = {.entry = {.count = 1, .reusable = false}}, SHIFT(218), + [1013] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [1015] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), + [1017] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), + [1019] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [1021] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [1023] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), + [1025] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [1027] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), + [1029] = {.entry = {.count = 1, .reusable = false}}, SHIFT(215), + [1031] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [1033] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [1035] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), + [1037] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [1039] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_type_parameters_repeat1, 2, 0, 0), SHIFT_REPEAT(284), + [1042] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_type_parameters_repeat1, 2, 0, 0), + [1044] = {.entry = {.count = 1, .reusable = false}}, SHIFT(221), + [1046] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [1048] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [1050] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_method_id, 4, 0, 35), + [1052] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_method_id, 4, 0, 35), + [1054] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [1056] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [1058] = {.entry = {.count = 1, .reusable = false}}, SHIFT(222), + [1060] = {.entry = {.count = 1, .reusable = false}}, SHIFT(224), + [1062] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [1064] = {.entry = {.count = 1, .reusable = true}}, SHIFT(182), + [1066] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [1068] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_global_var_declarations_repeat1, 2, 0, 0), + [1070] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_global_var_declarations_repeat1, 2, 0, 0), SHIFT_REPEAT(206), + [1073] = {.entry = {.count = 1, .reusable = false}}, SHIFT(225), + [1075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [1077] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [1079] = {.entry = {.count = 1, .reusable = false}}, SHIFT(238), + [1081] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [1083] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [1085] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [1087] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [1089] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_specifiers_list, 3, 0, 0), + [1091] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_specifiers_list, 3, 0, 0), + [1093] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [1095] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [1097] = {.entry = {.count = 1, .reusable = false}}, SHIFT(227), + [1099] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [1101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [1103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [1105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [1107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), + [1109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [1111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [1113] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameter_list_relaxed_repeat1, 2, 0, 30), SHIFT_REPEAT(203), + [1116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameter_list_relaxed_repeat1, 2, 0, 30), + [1118] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [1120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [1122] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [1124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [1126] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2, 0, 0), SHIFT_REPEAT(201), + [1129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2, 0, 0), + [1131] = {.entry = {.count = 1, .reusable = false}}, SHIFT(217), + [1133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), + [1135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [1137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), + [1139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), + [1141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameter, 2, 0, 8), + [1143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(354), + [1145] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constant_declaration, 3, 0, 10), + [1147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constant_declaration, 3, 0, 10), + [1149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), + [1151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_constant_declarations_repeat1, 2, 0, 0), + [1153] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_global_var_declaration, 2, 0, 7), + [1155] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_var_declaration, 2, 0, 7), + [1157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), + [1159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), + [1161] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_parameter_list_relaxed_repeat1, 2, 0, 0), + [1163] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constant_declaration, 4, 0, 18), + [1165] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constant_declaration, 4, 0, 18), + [1167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_parameter, 1, 0, 3), + [1169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameter_declaration, 2, 0, 7), + [1171] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_parameter_list_repeat1, 2, 0, 0), REDUCE(aux_sym_parameter_list_relaxed_repeat1, 2, 0, 0), + [1174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(331), + [1176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_global_var_declarations_repeat1, 2, 0, 0), + [1178] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [1180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(370), + [1182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(233), + [1184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [1186] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [1188] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [1190] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [1192] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), + [1194] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [1196] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [1198] = {.entry = {.count = 1, .reusable = true}}, SHIFT(389), + [1200] = {.entry = {.count = 1, .reusable = true}}, SHIFT(346), + [1202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(214), + [1204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [1206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(175), + [1208] = {.entry = {.count = 1, .reusable = true}}, SHIFT(162), + [1210] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), +}; + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) +#endif + +TS_PUBLIC const TSLanguage *tree_sitter_func(void) { + static const TSLanguage language = { + .abi_version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .supertype_count = SUPERTYPE_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .field_names = ts_field_names, + .field_map_slices = ts_field_map_slices, + .field_map_entries = ts_field_map_entries, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = (const void*)ts_lex_modes, + .lex_fn = ts_lex, + .keyword_lex_fn = ts_lex_keywords, + .keyword_capture_token = sym_identifier, + .primary_state_ids = ts_primary_state_ids, + .name = "func", + .max_reserved_word_set_size = 0, + .metadata = { + .major_version = 0, + .minor_version = 1, + .patch_version = 0, + }, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/server/src/languages/func/tree-sitter-func/src/tree_sitter/alloc.h b/server/src/languages/func/tree-sitter-func/src/tree_sitter/alloc.h new file mode 100644 index 00000000..1abdd120 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/src/tree_sitter/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t size); +extern void *(*ts_current_calloc)(size_t count, size_t size); +extern void *(*ts_current_realloc)(void *ptr, size_t size); +extern void (*ts_current_free)(void *ptr); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/server/src/languages/func/tree-sitter-func/src/tree_sitter/array.h b/server/src/languages/func/tree-sitter-func/src/tree_sitter/array.h new file mode 100644 index 00000000..a17a574f --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/src/tree_sitter/array.h @@ -0,0 +1,291 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./alloc.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +/// Initialize an array. +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +/// Create an empty array. +#define array_new() \ + { NULL, 0, 0 } + +/// Get a pointer to the element at a given `index` in the array. +#define array_get(self, _index) \ + (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) + +/// Get a pointer to the first element in the array. +#define array_front(self) array_get(self, 0) + +/// Get a pointer to the last element in the array. +#define array_back(self) array_get(self, (self)->size - 1) + +/// Clear the array, setting its size to zero. Note that this does not free any +/// memory allocated for the array's contents. +#define array_clear(self) ((self)->size = 0) + +/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is +/// less than the array's current capacity, this function has no effect. +#define array_reserve(self, new_capacity) \ + _array__reserve((Array *)(self), array_elem_size(self), new_capacity) + +/// Free any memory allocated for this array. Note that this does not free any +/// memory allocated for the array's contents. +#define array_delete(self) _array__delete((Array *)(self)) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + (_array__grow((Array *)(self), 1, array_elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + _array__grow((Array *)(self), count, array_elem_size(self)); \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ + (self)->size += (count); \ + } while (0) + +/// Append all elements from one array to the end of another. +#define array_push_all(self, other) \ + array_extend((self), (other)->size, (other)->contents) + +/// Append `count` elements to the end of the array, reading their values from the +/// `contents` pointer. +#define array_extend(self, count, contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), (self)->size, \ + 0, count, contents \ + ) + +/// Remove `old_count` elements from the array starting at the given `index`. At +/// the same index, insert `new_count` new elements, reading their values from the +/// `new_contents` pointer. +#define array_splice(self, _index, old_count, new_count, new_contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), _index, \ + old_count, new_count, new_contents \ + ) + +/// Insert one `element` into the array at the given `index`. +#define array_insert(self, _index, element) \ + _array__splice((Array *)(self), array_elem_size(self), _index, 0, 1, &(element)) + +/// Remove one element from the array at the given `index`. +#define array_erase(self, _index) \ + _array__erase((Array *)(self), array_elem_size(self), _index) + +/// Pop the last element off the array, returning the element by value. +#define array_pop(self) ((self)->contents[--(self)->size]) + +/// Assign the contents of one array to another, reallocating if necessary. +#define array_assign(self, other) \ + _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) + +/// Swap one array with another +#define array_swap(self, other) \ + _array__swap((Array *)(self), (Array *)(other)) + +/// Get the size of the array contents +#define array_elem_size(self) (sizeof *(self)->contents) + +/// Search a sorted array for a given `needle` value, using the given `compare` +/// callback to determine the order. +/// +/// If an existing element is found to be equal to `needle`, then the `index` +/// out-parameter is set to the existing value's index, and the `exists` +/// out-parameter is set to true. Otherwise, `index` is set to an index where +/// `needle` should be inserted in order to preserve the sorting, and `exists` +/// is set to false. +#define array_search_sorted_with(self, compare, needle, _index, _exists) \ + _array__search_sorted(self, 0, compare, , needle, _index, _exists) + +/// Search a sorted array for a given `needle` value, using integer comparisons +/// of a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_with`. +#define array_search_sorted_by(self, field, needle, _index, _exists) \ + _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) + +/// Insert a given `value` into a sorted array, using the given `compare` +/// callback to determine the order. +#define array_insert_sorted_with(self, compare, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +/// Insert a given `value` into a sorted array, using integer comparisons of +/// a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_by`. +#define array_insert_sorted_by(self, field, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +// Private + +typedef Array(void) Array; + +/// This is not what you're looking for, see `array_delete`. +static inline void _array__delete(Array *self) { + if (self->contents) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; + } +} + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(Array *self, size_t element_size, + uint32_t index) { + assert(index < self->size); + char *contents = (char *)self->contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (self->size - index - 1) * element_size); + self->size--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { + if (new_capacity > self->capacity) { + if (self->contents) { + self->contents = ts_realloc(self->contents, new_capacity * element_size); + } else { + self->contents = ts_malloc(new_capacity * element_size); + } + self->capacity = new_capacity; + } +} + +/// This is not what you're looking for, see `array_assign`. +static inline void _array__assign(Array *self, const Array *other, size_t element_size) { + _array__reserve(self, element_size, other->size); + self->size = other->size; + memcpy(self->contents, other->contents, self->size * element_size); +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(Array *self, Array *other) { + Array swap = *other; + *other = *self; + *self = swap; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { + uint32_t new_size = self->size + count; + if (new_size > self->capacity) { + uint32_t new_capacity = self->capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + _array__reserve(self, element_size, new_capacity); + } +} + +/// This is not what you're looking for, see `array_splice`. +static inline void _array__splice(Array *self, size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = self->size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= self->size); + + _array__reserve(self, element_size, new_size); + + char *contents = (char *)self->contents; + if (self->size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (self->size - old_end) * element_size + ); + } + if (new_count > 0) { + if (elements) { + memcpy( + (contents + index * element_size), + elements, + new_count * element_size + ); + } else { + memset( + (contents + index * element_size), + 0, + new_count * element_size + ); + } + } + self->size += new_count - old_count; +} + +/// A binary search routine, based on Rust's `std::slice::binary_search_by`. +/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. +#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ + do { \ + *(_index) = start; \ + *(_exists) = false; \ + uint32_t size = (self)->size - *(_index); \ + if (size == 0) break; \ + int comparison; \ + while (size > 1) { \ + uint32_t half_size = size / 2; \ + uint32_t mid_index = *(_index) + half_size; \ + comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ + if (comparison <= 0) *(_index) = mid_index; \ + size -= half_size; \ + } \ + comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ + if (comparison == 0) *(_exists) = true; \ + else if (comparison < 0) *(_index) += 1; \ + } while (0) + +/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) +/// parameter by reference in order to work with the generic sorting function above. +#define _compare_int(a, b) ((int)*(a) - (int)(b)) + +#ifdef _MSC_VER +#pragma warning(pop) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/server/src/languages/func/tree-sitter-func/src/tree_sitter/parser.h b/server/src/languages/func/tree-sitter-func/src/tree_sitter/parser.h new file mode 100644 index 00000000..cdbe64cc --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/src/tree_sitter/parser.h @@ -0,0 +1,287 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +typedef struct TSLanguageMetadata TSLanguageMetadata; +typedef struct TSLanguageMetadata { + uint8_t major_version; + uint8_t minor_version; + uint8_t patch_version; +} TSLanguageMetadata; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +// Used to index the field and supertype maps. +typedef struct { + uint16_t index; + uint16_t length; +} TSMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); + void (*log)(const TSLexer *, const char *, ...); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; + uint16_t reserved_word_set_id; +} TSLexerMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + +struct TSLanguage { + uint32_t abi_version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexerMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; + const char *name; + const TSSymbol *reserved_words; + uint16_t max_reserved_word_set_size; + uint32_t supertype_count; + const TSSymbol *supertype_symbols; + const TSMapSlice *supertype_map_slices; + const TSSymbol *supertype_map_entries; + TSLanguageMetadata metadata; +}; + +static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { + uint32_t index = 0; + uint32_t size = len - index; + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = index + half_size; + const TSCharacterRange *range = &ranges[mid_index]; + if (lookahead >= range->start && lookahead <= range->end) { + return true; + } else if (lookahead > range->end) { + index = mid_index; + } + size -= half_size; + } + const TSCharacterRange *range = &ranges[index]; + return (lookahead >= range->start && lookahead <= range->end); +} + +/* + * Lexer Macros + */ + +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + UNUSED \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define ADVANCE_MAP(...) \ + { \ + static const uint16_t map[] = { __VA_ARGS__ }; \ + for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ + if (map[i] == lookahead) { \ + state = map[i + 1]; \ + goto next_state; \ + } \ + } \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value) \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value), \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_name, children, precedence, prod_id) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_name, \ + .child_count = children, \ + .dynamic_precedence = precedence, \ + .production_id = prod_id \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/server/src/languages/func/tree-sitter-func/tree-sitter-func.wasm b/server/src/languages/func/tree-sitter-func/tree-sitter-func.wasm new file mode 100755 index 00000000..70cbd111 Binary files /dev/null and b/server/src/languages/func/tree-sitter-func/tree-sitter-func.wasm differ diff --git a/server/src/languages/func/tree-sitter-func/tree-sitter.json b/server/src/languages/func/tree-sitter-func/tree-sitter.json new file mode 100644 index 00000000..3ef35731 --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/tree-sitter.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/config.schema.json", + "grammars": [ + { + "name": "func", + "camelcase": "FunC", + "title": "FunC", + "scope": "source.func", + "file-types": ["func", "fc"], + "injection-regex": "^func$", + "class-name": "TreeSitterFunc" + } + ], + "metadata": { + "version": "0.1.0", + "license": "MIT", + "description": "FunC grammar for tree-sitter", + "authors": [ + { + "name": "akifog and TON Blockchain" + } + ], + "links": { + "repository": "https://github.com/ton-blockchain/tree-sitter-func" + } + }, + "bindings": { + "c": true, + "go": true, + "node": true, + "python": true, + "rust": true, + "swift": true, + "zig": false + } +} diff --git a/server/src/languages/func/tree-sitter-func/yarn.lock b/server/src/languages/func/tree-sitter-func/yarn.lock new file mode 100644 index 00000000..b3ac6f9e --- /dev/null +++ b/server/src/languages/func/tree-sitter-func/yarn.lock @@ -0,0 +1,12 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"tree-sitter-func@workspace:.": + version: 0.0.0-use.local + resolution: "tree-sitter-func@workspace:." + languageName: unknown + linkType: soft diff --git a/server/src/languages/tolk/completion/ReferenceCompletionProcessor.ts b/server/src/languages/tolk/completion/ReferenceCompletionProcessor.ts index 60ab7d86..8e768420 100644 --- a/server/src/languages/tolk/completion/ReferenceCompletionProcessor.ts +++ b/server/src/languages/tolk/completion/ReferenceCompletionProcessor.ts @@ -29,6 +29,7 @@ export interface CompletionItemAdditionalInformation { readonly name: string | undefined readonly file: TolkFile | undefined readonly elementFile: TolkFile | undefined + readonly language: "tolk" | "func" | undefined } export class ReferenceCompletionProcessor implements ScopeProcessor { @@ -83,10 +84,11 @@ export class ReferenceCompletionProcessor implements ScopeProcessor { return true } - const additionalData = { + const additionalData: CompletionItemAdditionalInformation = { elementFile: node.file, file: this.ctx.element.file, name: name, + language: "tolk", } if (node instanceof StaticMethod) { diff --git a/server/src/languages/tolk/completion/index.ts b/server/src/languages/tolk/completion/index.ts index ee5e0f77..e77f6bd0 100644 --- a/server/src/languages/tolk/completion/index.ts +++ b/server/src/languages/tolk/completion/index.ts @@ -134,6 +134,7 @@ export async function provideTolkCompletionResolve( if (data.file === undefined || data.elementFile === undefined || data.name === undefined) { return item } + if (data.language !== "tolk") return item // const settings = await getDocumentSettings(data.file.uri) // if (!settings.completion.addImports) return item diff --git a/server/src/languages/tolk/rename/file-renaming.ts b/server/src/languages/tolk/rename/file-renaming.ts index aa2c4198..99e5efc7 100644 --- a/server/src/languages/tolk/rename/file-renaming.ts +++ b/server/src/languages/tolk/rename/file-renaming.ts @@ -9,7 +9,7 @@ import {index} from "@server/languages/tolk/indexes" import {filePathToUri, findTolkFile, TOLK_PARSED_FILES_CACHE} from "@server/files" import {TolkFile} from "@server/languages/tolk/psi/TolkFile" -export async function processFileRenaming( +export async function processTolkFileRenaming( params: RenameFilesParams, ): Promise { const changes: Record = {} @@ -21,7 +21,7 @@ export async function processFileRenaming( return Object.keys(changes).length > 0 ? {changes} : null } -export function onFileRenamed(params: RenameFilesParams): void { +export function onTolkFileRenamed(params: RenameFilesParams): void { for (const fileRename of params.files) { const oldUri = fileRename.oldUri const newUri = fileRename.newUri diff --git a/server/src/languages/tolk/tree-sitter-tolk/src/parser.c b/server/src/languages/tolk/tree-sitter-tolk/src/parser.c index c4b92d89..9a7e1d08 100644 --- a/server/src/languages/tolk/tree-sitter-tolk/src/parser.c +++ b/server/src/languages/tolk/tree-sitter-tolk/src/parser.c @@ -1,4 +1,4 @@ -/* Automatically generated by tree-sitter v0.25.0 (16aaed78ae6582ea55a94419828922c7b0960e10) */ +/* Automatically generated by tree-sitter v0.25.1 (f5afe475deb7c0bae6407fb776c76824f717bb61) */ #include "tree_sitter/parser.h" diff --git a/server/src/parser.ts b/server/src/parser.ts index 7c4bd114..f4b2e275 100644 --- a/server/src/parser.ts +++ b/server/src/parser.ts @@ -3,16 +3,18 @@ import {Parser, Language} from "web-tree-sitter" export let tolkLanguage: Language | null = null +export let funcLanguage: Language | null = null export let fiftLanguage: Language | null = null export let tlbLanguage: Language | null = null export const initParser = async ( treeSitterUri: string, tolkLangUri: string, + funcLangUri: string, fiftLangUri: string, tlbLangUri: string, ): Promise => { - if (tolkLanguage && fiftLanguage && tlbLanguage) { + if (tolkLanguage && funcLanguage && fiftLanguage && tlbLanguage) { return } const options: object | undefined = { @@ -22,6 +24,7 @@ export const initParser = async ( } await Parser.init(options) tolkLanguage = await Language.load(tolkLangUri) + funcLanguage = await Language.load(funcLangUri) fiftLanguage = await Language.load(fiftLangUri) tlbLanguage = await Language.load(tlbLangUri) } @@ -32,6 +35,12 @@ export function createTolkParser(): Parser { return parser } +export function createFuncParser(): Parser { + const parser = new Parser() + parser.setLanguage(funcLanguage) + return parser +} + export function createFiftParser(): Parser { const parser = new Parser() parser.setLanguage(fiftLanguage) diff --git a/server/src/psi/comments.ts b/server/src/psi/comments.ts new file mode 100644 index 00000000..3b24c488 --- /dev/null +++ b/server/src/psi/comments.ts @@ -0,0 +1,54 @@ +import type {Node as SyntaxNode} from "web-tree-sitter" +import {Position} from "vscode-languageclient" +import {trimPrefix} from "@server/utils/strings" +import {asLspPosition} from "@server/utils/position" + +export function extractCommentsDocContent(node: SyntaxNode): { + lines: string[] + startPosition: Position +} | null { + const prevSibling = node.previousSibling + if (!prevSibling || prevSibling.type !== "comment") return null + + const nodeStartLine = node.startPosition.row + + const comments: SyntaxNode[] = [] + let comment: SyntaxNode | null = prevSibling + while (comment?.type === "comment") { + const commentStartLine = comment.startPosition.row + + if (commentStartLine + 1 + comments.length != nodeStartLine) { + break + } + + // possibly inline comment + const prev = comment.previousSibling + if (prev?.endPosition.row === commentStartLine) { + // same line with the previous node, inline comment + break + } + + comments.push(comment) + comment = comment.previousSibling + } + + if (comments.length === 0) return null + + const finalComments = comments.reverse() + + return { + lines: finalComments.map(c => + trimPrefix( + trimPrefix(trimPrefix(trimPrefix(c.text, ";;;"), "///"), "//"), + " ", + ).trimEnd(), + ), + startPosition: asLspPosition(comments[0].startPosition), + } +} + +export function extractCommentsDoc(node: SyntaxNode): string { + const content = extractCommentsDocContent(node) + if (!content) return "" + return content.lines.join("\n") +} diff --git a/server/src/server.ts b/server/src/server.ts index 31d73f76..ad852b3d 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -5,8 +5,9 @@ import {DocumentStore} from "./document-store" import {initParser} from "./parser" import {asParserPoint} from "@server/utils/position" import {index as tolkIndex, IndexRoot as TolkIndexRoot} from "@server/languages/tolk/indexes" +import {index as funcIndex, IndexRoot as FuncIndexRoot} from "@server/languages/func/indexes" import * as lsp from "vscode-languageserver" -import {DidChangeWatchedFilesParams, FileChangeType} from "vscode-languageserver" +import {DidChangeWatchedFilesParams, FileChangeType, RenameFilesParams} from "vscode-languageserver" import * as path from "node:path" import {globalVFS} from "@server/vfs/global" import {existsVFS} from "@server/vfs/files-adapter" @@ -33,12 +34,16 @@ import { FIFT_PARSED_FILES_CACHE, filePathToUri, findFiftFile, + findFuncFile, findTlbFile, findTolkFile, + FUNC_PARSED_FILES_CACHE, isFiftFile, + isFuncFile, isTlbFile, isTolkFile, reparseFiftFile, + reparseFuncFile, reparseTlbFile, reparseTolkFile, TLB_PARSED_FILES_CACHE, @@ -90,7 +95,28 @@ import {collectTolkInlays} from "@server/languages/tolk/inlays" import {provideTolkSignatureInfo} from "@server/languages/tolk/signature-help" import {provideTolkDocumentation} from "@server/languages/tolk/documentation" import {provideTolkTypeAtPosition} from "@server/languages/tolk/custom/type-at-position" -import {onFileRenamed, processFileRenaming} from "@server/languages/tolk/rename/file-renaming" +import { + onTolkFileRenamed, + processTolkFileRenaming, +} from "@server/languages/tolk/rename/file-renaming" +import {FuncIndexingRoot, FuncIndexingRootKind} from "@server/func-indexing-root" +import {provideFuncDefinition} from "@server/languages/func/find-definitions" +import {provideFuncSemanticTokens} from "@server/languages/func/semantic-tokens" +import {provideFuncCompletion} from "@server/languages/func/completion" +import {provideFuncReferences} from "@server/languages/func/find-references" +import {provideFuncRename, provideFuncRenamePrepare} from "@server/languages/func/rename" +import { + provideFuncDocumentSymbols, + provideFuncWorkspaceSymbols, +} from "@server/languages/func/symbols" +import {provideFuncDocumentation} from "@server/languages/func/documentation" +import {collectFuncInlays} from "@server/languages/func/inlays" +import {provideFuncFoldingRanges} from "@server/languages/func/foldings" +import {runFuncInspections} from "@server/languages/func/inspections" +import { + onFuncFileRenamed, + processFuncFileRenaming, +} from "@server/languages/func/rename/file-renaming" /** * Whenever LS is initialized. @@ -165,6 +191,15 @@ async function handleFileOpen( } } + if (isFuncFile(uri, event)) { + const file = await findFuncFile(uri) + funcIndex.addFile(uri, file) + + if (initializationFinished) { + await runFuncInspections(uri, file, true) + } + } + if (isFiftFile(uri, event)) { await findFiftFile(uri) } @@ -294,11 +329,15 @@ async function initialize(): Promise { if (stubsPath !== null) { const stubsUri = filePathToUri(stubsPath) tolkIndex.withStubsRoot(new TolkIndexRoot("stubs", stubsUri)) + funcIndex.withStubsRoot(new FuncIndexRoot("stubs", stubsUri)) console.info(`Using Tolk Stubs from ${stubsPath}`) const stubsRoot = new TolkIndexingRoot(stubsUri, TolkIndexingRootKind.Stdlib) await stubsRoot.index() + + const funcStubsRoot = new FuncIndexingRoot(stubsUri, FuncIndexingRootKind.Stdlib) + await funcStubsRoot.index() } reporter.report(90, "Indexing: (3/3) Workspace") @@ -306,6 +345,10 @@ async function initialize(): Promise { const tolkWorkspaceRoot = new TolkIndexingRoot(rootUri, TolkIndexingRootKind.Workspace) await tolkWorkspaceRoot.index() + funcIndex.withRoots([new FuncIndexRoot("workspace", rootUri)]) + const funcWorkspaceRoot = new FuncIndexingRoot(rootUri, FuncIndexingRootKind.Workspace) + await funcWorkspaceRoot.index() + reporter.report(100, "Ready") // When we are ready, just reload all applied highlighting and hints and clear cache @@ -391,9 +434,10 @@ connection.onInitialize(async (initParams: lsp.InitializeParams): Promise { @@ -448,6 +502,13 @@ connection.onInitialize(async (initParams: lsp.InitializeParams): Promise => { + const edits = await processTolkFileRenaming(params) + if (edits) { + return edits + } + const funcEdits = await processFuncFileRenaming(params) + if (funcEdits) { + return funcEdits + } + return null + }, + ) + connection.onNotification("workspace/didRenameFiles", (params: RenameFilesParams) => { + onTolkFileRenamed(params) + onFuncFileRenamed(params) + }) // eslint-disable-next-line @typescript-eslint/no-misused-promises connection.onDidChangeConfiguration(async () => { @@ -564,6 +667,13 @@ connection.onInitialize(async (initParams: lsp.InitializeParams): Promise { - return provideTolkWorkspaceSymbols() + return [...provideTolkWorkspaceSymbols(), ...provideFuncWorkspaceSymbols()] }) // Custom LSP requests @@ -891,7 +1058,7 @@ connection.onInitialize(async (initParams: lsp.InitializeParams): Promise): ServerSettings { defaultSettings.tolk.completion.addImports, }, }, + func: { + hints: { + disable: vsSettings.func?.hints.disable ?? defaultSettings.func.hints.disable, + showMethodId: + vsSettings.func?.hints.showMethodId ?? defaultSettings.func.hints.showMethodId, + }, + inspections: { + disabled: + vsSettings.func?.inspections.disabled ?? + defaultSettings.func.inspections.disabled, + }, + }, fift: { hints: { showGasConsumption: diff --git a/shared/src/config-scheme.ts b/shared/src/config-scheme.ts index 7b25244a..0caa4e68 100644 --- a/shared/src/config-scheme.ts +++ b/shared/src/config-scheme.ts @@ -11,6 +11,7 @@ export const defaultConfig: TonPluginConfigScheme = {} export interface ClientOptions { readonly treeSitterWasmUri: string readonly tolkLangWasmUri: string + readonly funcLangWasmUri: string readonly fiftLangWasmUri: string readonly tlbLangWasmUri: string } diff --git a/webpack.config.js b/webpack.config.js index f7b0cbe8..f48d2621 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -68,10 +68,18 @@ const config = { from: "./server/src/languages/tolk/stubs/stubs.tolk", to: path.join(distDir, "stubs"), }, + { + from: "./server/src/languages/func/stubs/stubs.fc", + to: path.join(distDir, "stubs"), + }, { from: "./server/src/languages/tolk/tree-sitter-tolk/tree-sitter-tolk.wasm", to: distDir, }, + { + from: "./server/src/languages/func/tree-sitter-func/tree-sitter-func.wasm", + to: distDir, + }, { from: "./server/src/languages/fift/tree-sitter-fift/tree-sitter-fift.wasm", to: distDir,