Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions hscript/Parser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2357,18 +2357,17 @@ class Parser {
invalidChar(char);
default:
if( ops[char] ) {
var buf = new StringBuf();
buf.addChar(char);
var op = String.fromCharCode(char);
while( true ) {
char = readChar();
if( StringTools.isEof(char) ) char = 0;
if( !ops[char] ) {
this.char = char;
return TOp(buf.toString());
return TOp(op);
}
var pop = buf.toString();
buf.addChar(char);
var op = buf.toString();

var pop = op;
op += String.fromCharCode(char);
if( allowRegex && op == "~/" ) {
var e = readString(char, true);
var f = readFlags();
Expand Down Expand Up @@ -2603,4 +2602,4 @@ class Parser {
@:structInit
final class PreprocValue {
public var r : Bool;
}
}