From 9b6f7974517e346ec2aa91ae451eebf83a692e8b Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Sat, 29 Jan 2022 12:24:38 -0600 Subject: [PATCH] ecs: debug info --- src/common/ecs/compiler.ts | 9 ++++++++- src/common/ecs/ecs.ts | 6 ++++++ src/common/tokenizer.ts | 7 ++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/common/ecs/compiler.ts b/src/common/ecs/compiler.ts index 5b35a017..49761fc9 100644 --- a/src/common/ecs/compiler.ts +++ b/src/common/ecs/compiler.ts @@ -183,7 +183,13 @@ export class ECSCompiler extends Tokenizer { } parseCode(): string { - return this.expectTokenTypes([TokenType.CodeFragment]).str; + let tok = this.expectTokenTypes([TokenType.CodeFragment]); + let code = tok.str; + let lines = code.split('\n'); + for (let i=0; i