Class: QgsVbScript¶
Parses and encapsulates an entire VBScript script.
Added in version 4.4.
List of all members, including inherited members
Constructor
Methods
Accepts a visitor to traverse the script abstract syntax tree. |
|
Dumps the abstract syntax tree back into an Arcade script string. |
|
Returns |
|
Returns parser error description. |
|
Returns the root block statement node, or |
|
Returns the original script text. |
Static Methods
Strips enclosing square brackets from text and unescapes double right brackets. |
|
Returns a field name enclosed in square brackets with internal right brackets escaped. |
|
Returns a properly quoted string literal (enclosed in double quotes with escape sequences). |
- class qgis.core.QgsVbScript[source]¶
Bases:
object- __init__(scriptText: str | None = '')¶
Creates a new script from
scriptText.- Parameters:
scriptText (str|None = '')
- __init__(other: QgsVbScript)
- Parameters:
other (QgsVbScript)
- acceptVisitor(self, visitor: QgsVbScriptVisitor)[source]¶
Accepts a visitor to traverse the script abstract syntax tree.
- Parameters:
visitor (QgsVbScriptVisitor)
- dump(self) str[source]¶
Dumps the abstract syntax tree back into an Arcade script string.
- Return type:
str
- static extractFieldReference(text: str | None) str[source]¶
Strips enclosing square brackets from
textand unescapes double right brackets.- Parameters:
text (str|None)
- Return type:
str
- static quotedFieldReference(fieldName: str | None) str[source]¶
Returns a field name enclosed in square brackets with internal right brackets escaped.
- Parameters:
fieldName (str|None)
- Return type:
str
- static quotedString(text: str | None) str[source]¶
Returns a properly quoted string literal (enclosed in double quotes with escape sequences).
- Parameters:
text (str|None)
- Return type:
str
- rootBlock(self) QgsVbScriptBlockStatement | None[source]¶
Returns the root block statement node, or
Noneif parsing failed.- Return type: