Skip to content

Commit 1ec64d5

Browse files
committed
bugfixes...
1 parent d734559 commit 1ec64d5

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/client/compiler/parser/Parser.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ASTNode, BracketsNode, SelectNode, TermNode, TableOrSubqueryNode, Table
55
import { Module } from "./Module.js";
66
import { Column } from "./SQLTable.js";
77
import { SQLBaseType, SQLNumberEnumType, SQLTextEnumType, SQLType } from "./SQLTypes.js";
8+
import { truncateSync } from "fs";
89

910
export type SQLStatement = {
1011
ast: ASTNode,
@@ -282,7 +283,9 @@ export class Parser {
282283
return ret;
283284
}
284285

285-
return token.indexOf(this.tt) >= 0;
286+
let found = token.indexOf(this.tt) >= 0;
287+
if(found && skip) this.nextToken;
288+
return found;
286289

287290
}
288291

@@ -673,6 +676,9 @@ export class Parser {
673676
case TokenType.keywordConstraint:
674677
this.parseAddConstraint(node);
675678
break;
679+
default:
680+
this.parseAddColumn(node);
681+
break;
676682
}
677683
} while (this.tt == TokenType.comma);
678684
}

src/client/compiler/parser/SQLTypes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ charType.addBinaryOperation(TokenType.keywordLike, charType, booleanType);
411411
charType.addBinaryOperation(TokenType.keywordLike, textType, booleanType);
412412
textType.addBinaryOperation(TokenType.keywordLike, textType, booleanType);
413413

414+
booleanType.addBinaryOperation(TokenType.equal, booleanType, booleanType);
415+
414416
let numericBinaryOperators: TokenType[] = [TokenType.plus, TokenType.minus, TokenType.multiplication, TokenType.division, TokenType.modulo];
415417
let comparisonOperators: TokenType[] = [TokenType.lower, TokenType.lowerOrEqual, TokenType.greater, TokenType.greaterOrEqual, TokenType.equal, TokenType.notEqual];
416418

0 commit comments

Comments
 (0)