Packagesystem.serializers.eden
Classpublic class ECMAScript
InheritanceECMAScript Inheritance GenericParser Inheritance Object

The ECMAScript parser class.



Public Properties
 PropertyDefined By
 Inheritedch : String
The current character to parse.
GenericParser
  comments : String
[static] The comments string representation.
ECMAScript
  localscope : *
The local scope reference.
ECMAScript
 Inheritedpos : uint
The current parser position in the string expression to parse.
GenericParser
 Inheritedsource : String
[read-only] Indicates the String source representation of the parser (read-only).
GenericParser
Public Methods
 MethodDefined By
  
ECMAScript(source:String)
Creates a new ECMAScript instance.
ECMAScript
  
eval():*
Eval the source and returns the serialized object.
ECMAScript
  
evaluate(source:String):*
[static] Evaluate the specified string source value with the parser.
ECMAScript
 Inherited
getChar():String
Returns the current char in the parse process.
GenericParser
 Inherited
getCharAt(pos:uint):String
Returns the char in the source to parse at the specified position.
GenericParser
 Inherited
hasMoreChar():Boolean
Indicates if the source parser has more char.
GenericParser
  
isAuthorized(path:String):Boolean
Indicates if the specified path is authorized in the config.authorized Array.
ECMAScript
  
isDigitNumber(num:String):Boolean
Indicates if the specified expression is a digit number value.
ECMAScript
  
isFutureReservedKeyword(identifier:String):Boolean
Indicates if the specified identifier string value is a future reserved keyword.
ECMAScript
  
isIdentifierPart(c:String):Boolean
Indicates if the identifier is a part.
ECMAScript
  
isIdentifierStart(c:String):Boolean
Indicates if the specified expression is a start identifier.
ECMAScript
  
isLineTerminator(c:String):Boolean
Inidcates if the specified character is a line terminator.
ECMAScript
  
isReservedKeyword(identifier:String):Boolean
Indicates if the specified indentifier is a reserved keyword.
ECMAScript
  
isValidPath(path:String):Boolean
Indicates if the specified path is valid.
ECMAScript
  
log(str:String):void
Dispatch a log message.
ECMAScript
 Inherited
next():String
Returns the next character in the source of this parser.
GenericParser
Protected Methods
 MethodDefined By
  
trace(message:String):void
Hook to catch the global trace function call
ECMAScript
Public Constants
 ConstantDefined By
  FUTUR_KEYWORDS : Array
[static] The following are reserved as future keywords by the ECMAScript specification.
ECMAScript
  RESERVED_KEYWORDS : Array
[static] The following are reserved words and may not be used as variables, functions, methods, or object identifiers.
ECMAScript
Property Detail
commentsproperty
public static var comments:String

The comments string representation.

localscopeproperty 
public var localscope:*

The local scope reference.

Constructor Detail
ECMAScript()Constructor
public function ECMAScript(source:String)

Creates a new ECMAScript instance.

Parameters
source:String — The string expression to parse.
Method Detail
debug()method
debug function debug(message:String):void

Parameters

message:String

eval()method 
public function eval():*

Eval the source and returns the serialized object.

Returns
*
evaluate()method 
public static function evaluate(source:String):*

Evaluate the specified string source value with the parser.

Parameters

source:String

Returns
*
isAuthorized()method 
public function isAuthorized(path:String):Boolean

Indicates if the specified path is authorized in the config.authorized Array.

Parameters

path:String

Returns
Boolean
isDigitNumber()method 
public function isDigitNumber(num:String):Boolean

Indicates if the specified expression is a digit number value.

Parameters

num:String

Returns
Boolean
isFutureReservedKeyword()method 
public function isFutureReservedKeyword(identifier:String):Boolean

Indicates if the specified identifier string value is a future reserved keyword.

Note : Future Reserved Keywords in ECMA-262 spec 7.5.3

Parameters

identifier:String

Returns
Boolean
isIdentifierPart()method 
public function isIdentifierPart(c:String):Boolean

Indicates if the identifier is a part.

Parameters

c:String

Returns
Boolean
isIdentifierStart()method 
public function isIdentifierStart(c:String):Boolean

Indicates if the specified expression is a start identifier.

Parameters

c:String

Returns
Boolean

See also

spec 7.6 (PDF p26/188)
isLineTerminator()method 
public function isLineTerminator(c:String):Boolean

Inidcates if the specified character is a line terminator.

Note: line terminators

         "\n" - u000A - LF : Line Feed
         "\R" - u000D - CR : Carriage Return
         ???  - u2028 - LS : Line Separator
         ???  - u2029 - PS : Paragraphe Separator
         

Parameters

c:String

Returns
Boolean

See also

spec 7.3 (PDF p24/188)
isReservedKeyword()method 
public function isReservedKeyword(identifier:String):Boolean

Indicates if the specified indentifier is a reserved keyword. Reserved Keywords see : ECMA-262 spec 7.5.2 p13 (PDF p25/188)

Parameters

identifier:String

Returns
Boolean
isValidPath()method 
public function isValidPath(path:String):Boolean

Indicates if the specified path is valid.

Parameters

path:String

Returns
Boolean
log()method 
public function log(str:String):void

Dispatch a log message. Add a config to either

  • store logs (nonblock parsing)
  • display logs (nonblock parsing)
  • throw an error (block parsing)
  • add a safety mecanism to prevent infinite loop log when the same error is logged over and over in non-blocking mode
  • Parameters

    str:String

    trace()method 
    protected function trace(message:String):void

    Hook to catch the global trace function call

    Parameters

    message:String

    traceGlobalPool()method 
    debug function traceGlobalPool():void

    tracePool()method 
    debug function tracePool():void

    Constant Detail
    FUTUR_KEYWORDSConstant
    public static const FUTUR_KEYWORDS:Array

    The following are reserved as future keywords by the ECMAScript specification.

    RESERVED_KEYWORDSConstant 
    public static const RESERVED_KEYWORDS:Array

    The following are reserved words and may not be used as variables, functions, methods, or object identifiers. The following are reserved as existing keywords by the ECMAScript specification: