Dehydra API: Difference between revisions

notes on item API
(notes on item API)
Line 52: Line 52:
<dd>Source location of the statement
<dd>Source location of the statement
<dt>.statements
<dt>.statements
<dd>Substatements--each element represents a value referenced in the statement.
<dd>"Dehydra Items"--each element represents a variable or value referred to in the statement.
</dl>
</dl>
</dl>
The API for "Dehydra items" is not fully documented, but here are a few items it has:


<dl>
<dt>.loc
<dd>Source location of the item.
<dt>.type
<dd>Type of the item.
<dt>.name
<dd>If the item is a variable, this is its name. If the item is a function/method call, this is the name of the function/method. If the item is a field access, this is the name of the field.
<dt>.isFcall
<dd>True if this item represents a function call.
<dt>.methodOf
<dd>If the item is a method or method call, this is the type that contains the method.
<dt>.fieldOf
<dd>If the item is a field access or method call, this is the subexpression to the left of the dot.
</dl>
</dl>


313

edits