/****************************************************************************** * This file was generated by langium-cli 3.3.0. * DO NOT EDIT MANUALLY! ******************************************************************************/ /* eslint-disable */ import type { AstNode, Reference, ReferenceInfo, TypeMetaData } from 'langium'; import { AbstractAstReflection } from 'langium'; export const SnakeskinTerminals = { FUNC_PREFIX: /(?<=\n\s*)\(\)\s*=>\s/, TEXT: /(?<=[\n\r]+\s+)(?!=+=|\/\*)[^\-\s<:?].*?(?=\r?\n)/s, COMMA: /,/, JS_EXPR: /JS Object, will be overwritten in the TokenBuilder/, ATTR_VAL_ML: /(?<==\s*).+?(?=\s+\.\s+|\s+\|\s+)/s, EXPR_TILL_EOL: /(?<=\s(return|=|if|for|throw|unless|- target|\?) ).+?(?=\r?\n)/, FROM: /from/, DASHED_ID: /[_a-zA-Z\-][\w\-]*?(?=-\w)[\-\w]+/, AS: /(?<=\s)as(?=\s)/, ASYNC: /(?<=\s)async(?=\s)/, ID: /[_a-zA-Z][\w]*/, ATTR_KEY: /(((((((?" | "<" | "" | ">" | "?" | "@@ignore" | "block" | "break" | "catch" | "continue" | "doctype" | "else" | "eval" | "extends" | "finally" | "for" | "forEach" | "forIn" | "head" | "if" | "import" | "include" | "interface" | "namespace" | "placeholder" | "putIn" | "return" | "super" | "switch" | "target" | "template" | "throw" | "try" | "unless" | "with"; export type SnakeskinTokenNames = SnakeskinTerminalNames | SnakeskinKeywordNames; export type AttrKey = string; export function isAttrKey(item: unknown): item is AttrKey { return typeof item === 'string'; } export type AttrVal = string; export function isAttrVal(item: unknown): item is AttrVal { return (typeof item === 'string' && (/(?<=\s(return|=|if|for|throw|unless|- target|\?) ).+?(?=\r?\n)/.test(item) || /[_a-zA-Z][\w]*/.test(item) || /"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/.test(item) || /[_a-zA-Z\-][\w\-]*?(?=-\w)[\-\w]+/.test(item) || /(?<==\s*).+?(?=\s+\.\s+|\s+\|\s+)/s.test(item) || /(?<=[\n\r]+\s+)(?!=+=|\/\*)[^\-\s<:?].*?(?=\r?\n)/s.test(item))); } export type ClassName = string; export function isClassName(item: unknown): item is ClassName { return typeof item === 'string'; } export type Directive = Block | Break | Call | Catch | Comment | Const | Continue | Decorator | DocType | Else | ElseIf | ElseUnless | Eval | Finally | For | ForEach | ForIn | Func | Global | Head | If | Ignore | IgnoreAllWhitespace | Import | Include | Namespace | Output | Placeholder | PutIn | Return | Super | Switch | Tag | Target | Template | Throw | Try | Unless | Var | Void | With; export const Directive = 'Directive'; export function isDirective(item: unknown): item is Directive { return reflection.isInstance(item, Directive); } export type DottedID = string; export function isDottedID(item: unknown): item is DottedID { return typeof item === 'string'; } export type TagName = string; export function isTagName(item: unknown): item is TagName { return typeof item === 'string'; } export interface Attribute extends AstNode { readonly $container: Tag; readonly $type: 'Attribute'; key: AttrKey; modifiers: Array; value?: AttrVal; } export const Attribute = 'Attribute'; export function isAttribute(item: unknown): item is Attribute { return reflection.isInstance(item, Attribute); } export interface Block extends AstNode { readonly $container: Block | Call | Case | Catch | Else | ElseIf | ElseUnless | Eval | Finally | For | ForEach | ForIn | Func | Head | If | IgnoreAllWhitespace | Module | Placeholder | PutIn | Tag | Target | Template | Try | Unless | Var; readonly $type: 'Block'; body: Array; container?: Reference