Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve parsing of const

  • Loading branch information...
commit 1d73cf45aaccab3646bb8f4e27c2ebd7978df067 1 parent 483238e
@NotFound authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 winxedst1.winxed
  2. +2 −2 winxedst2.winxed
View
4 winxedst1.winxed
@@ -7860,9 +7860,9 @@ class ConstStatement : Statement
function parseConst(var start, var tk, var owner)
{
var t = tk.get();
- string type = typetoregcheck(t);
+ string type = t.isidentifier() ? typetoregcheck(t.getidentifier()) : "";
if (type != REGint && type != REGfloat && type != REGstring)
- SyntaxError("Invalid type for const", start);
+ SyntaxError("Invalid type for const", t);
var multi = null;
do {
View
4 winxedst2.winxed
@@ -10270,9 +10270,9 @@ class ConstStatement : Statement
function parseConst(var start, var tk, var owner)
{
var t = tk.get();
- string type = typetoregcheck(t);
+ string type = t.isidentifier() ? typetoregcheck(t.getidentifier()) : "";
if (type != REGint && type != REGfloat && type != REGstring)
- SyntaxError("Invalid type for const", start);
+ SyntaxError("Invalid type for const", t);
var multi = null;
do {
Please sign in to comment.
Something went wrong with that request. Please try again.