ES6 Plato on GitHub
Report Home
Summary Display
escomplex-commons/src/utils/ast/ASTData.ts
Maintainability
81.80
Lines of code
34
Difficulty
5.83
Estimated Errors
0.04
Function weight
By Complexity
By SLOC
/** * Defines the output data from parsing an AST tree. */ export default class ASTData { source: string; operands: any[]; operators: any[]; /** * Initializes ASTData */ constructor() { this.source = ""; this.operands = []; this.operators = []; } /** * Appends a string. * * @param string - A string to append. */ write(string: string) { this.source += string; } /** * Convert to string */ toString(): string { return this.source; } }