com.caucho.es.parser |
This package contains the code for compiling JavaScript files.
Most applications will use the Parser.parse(String) interface
to parse JavaScript. That method will try to load a precompiled
script from the work directory before trying to parse it.
Applications will often set the script path a directory for
script and include the classpath in the path. Applications will
often override the work dir for a more appropriate work directory.
package com.caucho.vfs.*;
package com.caucho.es.*;
...
com.caucho.es.parser.Parser parser;
parser = new com.caucho.es.parser.Parser();
MergePath scriptPath = new MergePath();
scriptPath.addMergePath(Vfs.lookup("/home/ferg/js"));
scriptPath.addClassPath(loader);
parser.setScriptPath(scriptPath);
Path workPath = Vfs.lookup("/tmp/caucho/work");
parser.setWorkDir(workPath);
Script script = parser.parse("test.js");
|
Java Source File Name | Type | Comment |
AssignExpr.java | Class | Expr is an intermediate form representing an expression. |
BinaryExpr.java | Class | Expr is an intermediate form representing an expression. |
Block.java | Class | Block is an intermediate form representing an expression. |
BooleanBinaryExpr.java | Class | Expr is an intermediate form representing an expression. |
BooleanExpr.java | Class | Expr is an intermediate form representing an expression. |
CallExpr.java | Class | Represents a method call. |
CastExpr.java | Class | CastExpr represents casting. |
ConditionalExpr.java | Class | Expr is an intermediate form representing an expression. |
DeleteExpr.java | Class | Expr is an intermediate form representing an expression. |
Expr.java | Class | Expr is an intermediate form representing an expression. |
FieldExpr.java | Class | FieldExpr is an intermediate form representing a field reference. |
Function.java | Class | Function is an intermediate form representing an expression. |
IdExpr.java | Class | Expr is an intermediate form representing an expression. |
JavaClassExpr.java | Class | Expression representing a java class object. |
JavaMethod.java | Class | Utility class for selecting the best Java method matching the
JavaScript call arguments. |
JavaNewExpr.java | Class | JavaNewExpr is an intermediate form representing a new expression
when the type is known to be a java class. |
JavaTypeExpr.java | Class | Expression for a java type. |
Lexer.java | Class | JavaScript lexer. |
LiteralExpr.java | Class | Represents a java literal. |
PackageExpr.java | Class | Expression representing a Java package, i.e. |
ParseClass.java | Class | |
Parser.java | Class | Parser is a factory for generating compiled Script objects.
Most applications will use the parse(String) interface
to parse JavaScript. |
PlusExpr.java | Class | Expr is an intermediate form representing an expression. |
PostfixExpr.java | Class | Expr is an intermediate form representing an expression. |
RegexpExpr.java | Class | Expr is an intermediate form representing an expression. |
SpecialExpr.java | Class | Expr is an intermediate form representing an expression. |
TopExpr.java | Class | Expr is an intermediate form representing an expression. |
TypeExpr.java | Class | Expr is an intermediate form representing an expression. |
UnaryExpr.java | Class | Expr is an intermediate form representing an expression. |
Variable.java | Class | Expr is an intermediate form representing an expression. |