jasy.parse package

Submodules

jasy.parse.AbstractNode module

class jasy.parse.AbstractNode.AbstractNode(tokenizer=None, type=None, args=[])[source]

Bases: list

append(kid, rel=None)[source]

Appends the given kid with an optional relation hint.

assignOp
comments
condition
elsePart
end
fileId
getChildrenLength(filter=True)[source]

Number of (per default unrelated) children.

getFileName()[source]

Traverses up the tree to find a node with a fileId and returns it.

getSource()[source]

Returns the source code of the node.

getUnrelatedChildren()[source]

Collects all unrelated children.

initializer
insert(index, kid)[source]

Inserts the given kid at the given index.

insertAll(index, kids)[source]

Inserts all kids starting with the given index.

insertAllReplace(orig, kids)[source]

Inserts all kids at the same position as the original node (which is removed afterwards)

line
name
names
params
parent
parenthesized
postfix
rel
remove(kid)[source]

Removes the given kid.

replace(kid, repl)[source]

Replaces the given kid with a replacement kid.

scope
start
statement
statements
thenPart
toXml(format=True, indent=0, tab=' ')[source]

Converts the node to XML.

tokenizer
type
value
values
variables

jasy.parse.ScopeData module

class jasy.parse.ScopeData.ScopeData[source]

Bases: object

Used by core/Variables.py to store the resulting statistics data efficiently. Contains information about:

  • Declared Variables (declared)
  • Modified Variables (modified)
  • Shared
  • Unused Variables (unused)
accessed
declared
export()[source]

Exports all data as a Python dict instance.

increment(name, by=1)[source]

Small helper so simplify adding variables to “accessed” dict.

modified
name
packages
params
shared
unused

Module contents