feat: add molang package
1. upgrade bukkit chat 2. fix config update error Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
25
packages/molang/src/tokenizer/token.ts
Normal file
25
packages/molang/src/tokenizer/token.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
export type TTokenType = string
|
||||
|
||||
export class Token {
|
||||
constructor(
|
||||
protected type: string,
|
||||
protected text: string,
|
||||
protected startColumn: number,
|
||||
protected startLine: number
|
||||
) {}
|
||||
|
||||
getType() {
|
||||
return this.type
|
||||
}
|
||||
getText() {
|
||||
return this.text
|
||||
}
|
||||
getPosition() {
|
||||
return {
|
||||
startColumn: this.startColumn,
|
||||
startLineNumber: this.startLine,
|
||||
endColumn: this.startColumn + this.text.length,
|
||||
endLineNumber: this.startLine,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user