faster syntax highlighting

This commit is contained in:
honfika@gmail.com
2015-09-16 14:12:13 +02:00
parent 5e42c5b57c
commit e8fb8e2f37
41 changed files with 2129 additions and 2175 deletions

View File

@@ -1,18 +1,19 @@
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.ecma;
/**
@@ -93,11 +94,8 @@ public class EcmaScript {
if (type(px) != EcmaType.STRING || type(py) != EcmaType.STRING) {
Double nx = toNumber(px);
Double ny = toNumber(py);
Double ny = toNumber(py);
if (nx.isNaN()) {
return new Undefined();
}
if (ny.isNaN()) {
if (nx.isNaN() || ny.isNaN()) {
return Undefined.INSTANCE;
}
if ((nx).compareTo(ny) == 0) {
return false;

View File

@@ -1,24 +1,30 @@
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.ecma;
import java.io.Serializable;
public class Null implements Serializable {
public static Null INSTANCE = new Null();
private Null() {
}
@Override
public String toString() {
return "null";

View File

@@ -1,24 +1,30 @@
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.ecma;
import java.io.Serializable;
public class Undefined implements Serializable {
public static Undefined INSTANCE = new Undefined();
private Undefined() {
}
@Override
public String toString() {
return "undefined";