Permalink
Browse files

improve parsing of const

  • Loading branch information...
NotFound committed Jun 10, 2012
1 parent 483238e commit 1d73cf45aaccab3646bb8f4e27c2ebd7978df067
Showing with 4 additions and 4 deletions.
  1. +2 −2 winxedst1.winxed
  2. +2 −2 winxedst2.winxed
View
@@ -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
@@ -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 {

0 comments on commit 1d73cf4

Please sign in to comment.