feat: code blocks beta
This commit is contained in:
parent
362b7aa15e
commit
1ecb6d8682
19 changed files with 756 additions and 94 deletions
|
@ -129,6 +129,41 @@ class ASTBuilder {
|
|||
);
|
||||
}
|
||||
|
||||
if (token.type === "client" || token.type === "server") {
|
||||
if (this.options.debug) {
|
||||
console.log(
|
||||
`\n[ASTBuilder] Processing ${token.type} block at line ${token.line}, column ${token.column}`
|
||||
);
|
||||
}
|
||||
|
||||
const node = {
|
||||
type: token.type,
|
||||
script: token.value,
|
||||
line: token.line,
|
||||
column: token.column,
|
||||
};
|
||||
|
||||
if (token.type === "server" && token.params) {
|
||||
node.params = token.params;
|
||||
if (this.options.debug) {
|
||||
console.log(
|
||||
`[ASTBuilder] Server block parameters: ${node.params.join(", ")}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.debug) {
|
||||
console.log(`[ASTBuilder] Created node for ${token.type} block`);
|
||||
console.log(
|
||||
"[ASTBuilder] Script content (first 50 chars):",
|
||||
node.script.substring(0, 50) + (node.script.length > 50 ? "..." : "")
|
||||
);
|
||||
}
|
||||
|
||||
current++;
|
||||
return node;
|
||||
}
|
||||
|
||||
if (token.type === "identifier") {
|
||||
if (this.options.debug) {
|
||||
console.log(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue