jasy.script.parse package
Submodules
jasy.script.parse.Lang module
jasy.script.parse.Node module
-
class jasy.script.parse.Node.Node(tokenizer=None, type=None, args=[])[source]
Bases: jasy.parse.AbstractNode.AbstractNode
-
assignOp
-
block
-
body
-
condition
-
defaultIndex
-
discriminant
-
elsePart
-
end
-
exception
-
expression
-
expressionClosure
-
fileId
-
finallyBlock
-
for
-
functionForm
-
guard
-
initializer
-
isEach
-
isLoop
-
iterator
-
label
-
line
-
name
-
names
-
object
-
params
-
parent
-
parenthesized
-
postfix
-
readOnly
-
rel
-
scope
-
setup
-
start
-
statement
-
statements
-
tail
-
thenPart
-
tokenizer
-
tryBlock
-
type
-
update
-
value
-
variables
jasy.script.parse.Parser module
-
jasy.script.parse.Parser.parse(source, fileId=None, line=1, builder=None)[source]
-
jasy.script.parse.Parser.parseExpression(source, fileId=None, line=1, builder=None)[source]
jasy.script.parse.ScopeScanner module
-
jasy.script.parse.ScopeScanner.scan(tree)[source]
Scans the given tree and attaches variable data instances (core/ScopeData.py) to every scope (aka function).
This data is being stored independently from the real tree so that if you modifiy the tree the
data is not automatically updated. This means that every time you modify the tree heavily,
it might make sense to re-execute this method to bring it in sync to the current tree structure.
jasy.script.parse.VanillaBuilder module
-
class jasy.script.parse.VanillaBuilder.VanillaBuilder[source]
Bases: builtins.object
The vanilla AST builder.
-
ADD_addOperand(node, childNode)[source]
-
ADD_build(tokenizer)[source]
-
ADD_finish(node)[source]
-
AND_addOperand(node, childNode)[source]
-
AND_build(tokenizer)[source]
-
AND_finish(node)[source]
-
ARRAYCOMP_build(tokenizer)[source]
-
ARRAYCOMP_finish(node)[source]
-
ARRAYCOMP_setExpression(node, expression)[source]
-
ARRAYCOMP_setTail(node, childNode)[source]
-
ARRAYINIT_addElement(node, childNode)[source]
-
ARRAYINIT_build(tokenizer)[source]
-
ARRAYINIT_finish(node)[source]
-
ASSIGN_addOperand(node, childNode)[source]
-
ASSIGN_build(tokenizer)[source]
-
ASSIGN_finish(node)[source]
-
ASSIGN_setAssignOp(node, operator)[source]
-
BITWISEAND_addOperand(node, childNode)[source]
-
BITWISEAND_build(tokenizer)[source]
-
BITWISEAND_finish(node)[source]
-
BITWISEOR_addOperand(node, childNode)[source]
-
BITWISEOR_build(tokenizer)[source]
-
BITWISEOR_finish(node)[source]
-
BITWISEXOR_addOperand(node, childNode)[source]
-
BITWISEXOR_build(tokenizer)[source]
-
BITWISEXOR_finish(node)[source]
-
BLOCK_addStatement(node, childNode)[source]
-
BLOCK_build(tokenizer, id)[source]
-
BLOCK_finish(node)[source]
-
BLOCK_hoistLets(node)[source]
-
BREAK_build(tokenizer)[source]
-
BREAK_finish(node)[source]
-
BREAK_setLabel(node, label)[source]
-
BREAK_setTarget(node, target)[source]
-
CASE_addStatement(node, statement)[source]
-
CASE_build(tokenizer)[source]
-
CASE_finish(node)[source]
-
CASE_initializeStatements(node, tokenizer)[source]
-
CASE_setLabel(node, expression)[source]
-
CATCH_build(tokenizer)[source]
-
CATCH_finish(node)[source]
-
CATCH_setBlock(node, statement)[source]
-
CATCH_setException(node, exception)[source]
-
CATCH_setGuard(node, expression)[source]
-
CATCH_wrapException(tokenizer)[source]
-
COMMA_addOperand(node, childNode)[source]
-
COMMA_build(tokenizer)[source]
-
COMMA_finish(node)[source]
-
COMPTAIL_addFor(node, childNode)[source]
-
COMPTAIL_build(tokenizer)[source]
-
COMPTAIL_finish(node)[source]
-
COMPTAIL_setGuard(node, expression)[source]
-
CONST_addDecl(node, childNode, childContext=None)[source]
-
CONST_build(tokenizer)[source]
-
CONST_finish(node)[source]
-
CONTINUE_build(tokenizer)[source]
-
CONTINUE_finish(node)[source]
-
CONTINUE_setLabel(node, label)[source]
-
CONTINUE_setTarget(node, target)[source]
-
DEBUGGER_build(tokenizer)[source]
-
DECL_build(tokenizer)[source]
-
DECL_finish(node)[source]
-
DECL_setInitializer(node, expression)[source]
-
DECL_setName(node, identifier)[source]
-
DECL_setNames(node, expression)[source]
-
DECL_setReadOnly(node, readOnly)[source]
-
DEFAULT_addStatement(node, statement)[source]
-
DEFAULT_build(tokenizer)[source]
-
DEFAULT_finish(node)[source]
-
DEFAULT_initializeStatements(node, tokenizer)[source]
-
DO_build(tokenizer)[source]
-
DO_finish(node)[source]
-
DO_setBody(node, statement)[source]
-
DO_setCondition(node, expression)[source]
-
EQUALITY_addOperand(node, childNode)[source]
-
EQUALITY_build(tokenizer)[source]
-
EQUALITY_finish(node)[source]
-
EXPRESSION_addOperand(node, childNode)[source]
-
EXPRESSION_build(tokenizer, tokenType)[source]
-
EXPRESSION_finish(node)[source]
-
FOR_build(tokenizer)[source]
-
FOR_finish(node)[source]
-
FOR_rebuildForEach(node)[source]
-
FOR_rebuildForIn(node)[source]
-
FOR_setBody(node, statement)[source]
-
FOR_setCondition(node, expression)[source]
-
FOR_setIterator(node, expression, forBlock=None)[source]
-
FOR_setObject(node, expression, forBlock=None)[source]
-
FOR_setSetup(node, expression)[source]
-
FOR_setUpdate(node, expression)[source]
-
FUNCTION_addParam(node, tokenizer, expression)[source]
-
FUNCTION_build(tokenizer)[source]
-
FUNCTION_finish(node, x)[source]
-
FUNCTION_hoistVars(x)[source]
-
FUNCTION_initParams(node, tokenizer)[source]
-
FUNCTION_setBody(node, statement)[source]
-
FUNCTION_setExpressionClosure(node, expressionClosure)[source]
-
FUNCTION_setName(node, identifier)[source]
-
FUNCTION_wrapParam(tokenizer)[source]
-
GENERATOR_build(tokenizer)[source]
-
GENERATOR_finish(node)[source]
-
GENERATOR_setExpression(node, expression)[source]
-
GENERATOR_setTail(node, childNode)[source]
-
HOOK_build(tokenizer)[source]
-
HOOK_finish(node)[source]
-
HOOK_setCondition(node, expression)[source]
-
HOOK_setElsePart(node, childNode)[source]
-
HOOK_setThenPart(node, childNode)[source]
-
IF_build(tokenizer)[source]
-
IF_finish(node)[source]
-
IF_setCondition(node, expression)[source]
-
IF_setElsePart(node, statement)[source]
-
IF_setThenPart(node, statement)[source]
-
LABEL_build(tokenizer)[source]
-
LABEL_finish(node)[source]
-
LABEL_setLabel(node, label)[source]
-
LABEL_setStatement(node, statement)[source]
-
LETBLOCK_build(tokenizer)[source]
-
LETBLOCK_finish(node)[source]
-
LETBLOCK_setBlock(node, statement)[source]
-
LETBLOCK_setExpression(node, expression)[source]
-
LETBLOCK_setVariables(node, childNode)[source]
-
LET_addDecl(node, childNode, childContext=None)[source]
-
LET_build(tokenizer)[source]
-
LET_finish(node)[source]
-
LIST_addOperand(node, childNode)[source]
-
LIST_build(tokenizer)[source]
-
LIST_finish(node)[source]
-
MEMBER_addOperand(node, childNode)[source]
-
MEMBER_build(tokenizer, tokenType=None)[source]
-
MEMBER_finish(node)[source]
-
MEMBER_rebuildNewWithArgs(node)[source]
-
MULTIPLY_addOperand(node, childNode)[source]
-
MULTIPLY_build(tokenizer)[source]
-
MULTIPLY_finish(node)[source]
-
OBJECTINIT_addProperty(node, childNode)[source]
-
OBJECTINIT_build(tokenizer)[source]
-
OBJECTINIT_finish(node)[source]
-
OR_addOperand(node, childNode)[source]
-
OR_build(tokenizer)[source]
-
OR_finish(node)[source]
-
PRIMARY_build(tokenizer, tokenType)[source]
-
PRIMARY_finish(node)[source]
-
PROPERTYINIT_addOperand(node, childNode)[source]
-
PROPERTYINIT_build(tokenizer)[source]
-
PROPERTYINIT_finish(node)[source]
-
RELATIONAL_addOperand(node, childNode)[source]
-
RELATIONAL_build(tokenizer)[source]
-
RELATIONAL_finish(node)[source]
-
RETURN_build(tokenizer)[source]
-
RETURN_finish(node)[source]
-
RETURN_setValue(node, expression)[source]
-
SEMICOLON_build(tokenizer)[source]
-
SEMICOLON_finish(node)[source]
-
SEMICOLON_setExpression(node, expression)[source]
-
SHIFT_addOperand(node, childNode)[source]
-
SHIFT_build(tokenizer)[source]
-
SHIFT_finish(node)[source]
-
SWITCH_addCase(node, childNode)[source]
-
SWITCH_build(tokenizer)[source]
-
SWITCH_finish(node)[source]
-
SWITCH_setDefaultIndex(node, index)[source]
-
SWITCH_setDiscriminant(node, expression)[source]
-
THROW_build(tokenizer)[source]
-
THROW_finish(node)[source]
-
THROW_setException(node, expression)[source]
-
TRY_addCatch(node, childNode)[source]
-
TRY_build(tokenizer)[source]
-
TRY_finish(node)[source]
-
TRY_finishCatches(node)[source]
-
TRY_setFinallyBlock(node, statement)[source]
-
TRY_setTryBlock(node, statement)[source]
-
UNARY_addOperand(node, childNode)[source]
-
UNARY_build(tokenizer)[source]
-
UNARY_finish(node)[source]
-
UNARY_setPostfix(node)[source]
-
VAR_addDecl(node, childNode, childContext=None)[source]
-
VAR_build(tokenizer)[source]
-
VAR_finish(node)[source]
-
WHILE_build(tokenizer)[source]
-
WHILE_finish(node)[source]
-
WHILE_setBody(node, statement)[source]
-
WHILE_setCondition(node, expression)[source]
-
WITH_build(tokenizer)[source]
-
WITH_finish(node)[source]
-
WITH_setBody(node, statement)[source]
-
WITH_setObject(node, expression)[source]
-
YIELD_build(tokenizer)[source]
-
YIELD_finish(node)[source]
-
YIELD_setValue(node, expression)[source]
-
setHoists(id, vds)[source]
Module contents