import { LexerToken } from '../../interfaces/lexer-token'; import { HttpClient } from '@angular/common/http'; import { LanguageService } from '../language/language.service'; export declare class Lexer { private http; private language; private individuals; private individualContext; constructor(http: HttpClient, language: LanguageService); /** * Checks if a given character sequence matches an integer value. * @param chars A character sequence from the lexer * @return True if the character sequence matches an integer, otherwise false */ isInteger(chars: string): boolean; /** * Checks if a given character sequence matches a float value. * @param chars A character sequence from the lexer * @return True if the character sequence matches a float, otherwise false */ isFloat(chars: string): boolean; /** * Detects which token should be generated for a given character sequence, * and returns the corresponding token object. * @param chars A character sequence from the lexer * @param i * @return */ getTokenObject(chars: string, i: number): LexerToken; /** * Removes all empty tokens from a token array. * @param tokens A token array from the lexer * @return An array of all remaining non-empty tokens in correct order */ removeEmptyTokens(tokens: LexerToken[]): LexerToken[]; /** * Converts a given token's "which" property into a corresponding CSS class. * This is done by replacing camel case syntax by hyphens (-) and small letters. * @param tokenWhich A token's "which" property * @return The corresponding CSS class name */ getCssClass(tokenWhich: LexerToken['which']): string; /** * Performs lexing operations on each code line successively. * @param code An array of BBScript code lines * @return An array of arrays, containing all tokens per code line */ lexCode(code: string[]): Array; lexCodeReactive(code: Array): Array; /** * Performs lexing operations on a BBScript code line. * @param codeLine A string consisting of plain BBScript code * @return An array of tokens which represent the code's components */ lexLine(codeLine: string): LexerToken[]; /** * Performs a syntax highlighting by taking into account all tokens and generating a span for each token, * giving them adequate CSS classes which are defined in an editor theme CSS file. * @param codeLine A line of BBScript code * @return */ syntaxHighlighting(codeLine: string): string; }