UNPKG

java2ib

Version:

TypeScript library that converts Java code into IB Computer Science pseudocode format

44 lines 1.13 kB
/** * Lexical analyzer for Java source code */ import { Token, ConversionError } from './types'; export declare class Lexer { private input; private position; private line; private column; private errors; private static readonly KEYWORDS; private static readonly OPERATORS; private static readonly PUNCTUATION; constructor(input: string); /** * Tokenize the input Java code * @returns Array of tokens and any lexical errors */ tokenize(): { tokens: Token[]; errors: ConversionError[]; }; private nextToken; private readLineComment; private readBlockComment; private readStringLiteral; private readCharLiteral; private readNumericLiteral; private readIdentifierOrKeyword; private readOperator; private matchString; private skipWhitespace; private isWhitespace; private isDigit; private isAlpha; private isAlphaNumeric; private peek; private peekNext; private advance; private isAtEnd; private getCurrentLocation; private addError; } //# sourceMappingURL=lexer.d.ts.map