RustNonStreamCodeGenerator
Class handling the translation of non-stream expressions
Attributes
- Graph
- Supertypes
Members list
Value members
Concrete methods
Translates an assignment from TeSSLa Core into Rust
Translates an assignment from TeSSLa Core into Rust
Attributes
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The expression assigned to id
- id
The id which is assigned
- tm
The TypeArgManagement to resolve type parameters
- Returns:
The translated assignment
- Definition Classes
Translates a block of statements with return expression (i.e. the body of a lambda) to Rust statements
Translates a block of statements with return expression (i.e. the body of a lambda) to Rust statements
Attributes
- body
The sequence of statements to be translated
- defContext
Definition context depicting all var names in the current scope to their definition expression
- ret
The return expression of the block
- tm
The TypeArgManagement to resolve type parameters
- Returns:
The translated block.
- Definition Classes
Performs the translation of calls to built-in function to a Rust expression Note: Mutable datastructures are not yet handled on this branch since they are not generated
Performs the translation of calls to built-in function to a Rust expression Note: Mutable datastructures are not yet handled on this branch since they are not generated
Attributes
- name
Name of the function which is called
- oArgs
Argument expressions of the function call
- tm
The TypeArgManagement to resolve type parameters
- typeHint
The type signature of the called function.
- Returns:
The translated function call in Rust
Translates an ExpressionOrRef to a corresponding Rust expression
Translates an ExpressionOrRef to a corresponding Rust expression
Attributes
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The expression to be translated
- tm
The TypeArgManagement to resolve type parameters
- Returns:
The translated expression
- Definition Classes
Translates an ExternExpression. If the extern is of function type a lambda expression is wrapped around it. If the extern is directly applied this lambda is most likely unnecessary and this function should not be used for translation of the called extern.
Translates an ExternExpression. If the extern is of function type a lambda expression is wrapped around it. If the extern is directly applied this lambda is most likely unnecessary and this function should not be used for translation of the called extern.
Attributes
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The ExternExpression
- tm
The TypeArgManagement to resolve type parameters
- Returns:
The translated expression
- Definition Classes
Translates a TeSSLa Core FunctionExpression to a Rust expression
Translates a TeSSLa Core FunctionExpression to a Rust expression
Attributes
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The function to be translated
- tm
The TypeArgManagement to resolve type parameters
- Returns:
The translated function expression
- Definition Classes
Translates a function application to Rust
Translates a function application to Rust
Attributes
- args
The argument expressions of the application
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The function expression which is applied
- tm
The TypeArgManagement to resolve type parameters
- Returns:
The translated function application
- Definition Classes
Translates a global function definition from TeSSLa Core into a static Rust function
Translates a global function definition from TeSSLa Core into a static Rust function
Attributes
- definition
The function definition
- id
The id which is assigned
- srcSegments
The translated function is defined globally, and a pointer to it is stored in the state as a TesslaValue
Generate all the necessary code and implement any Traits needed for a Rust struct
Generate all the necessary code and implement any Traits needed for a Rust struct
Attributes
- fields
An ordered list of all fields with their name and type
- srcSegments
The struct definition and its accompanying impls are put in the static segment
- structName
A reproducible name generated from the struct field names
Inherited methods
Checks whether a given expression only uses identifiers from definedIdentifiers, i.e. those already defined
Checks whether a given expression only uses identifiers from definedIdentifiers, i.e. those already defined
Attributes
- e
Expression to be examined
- Returns:
Whether all subexpressions are already defined and and the expression can hence be evaluated
- Inherited from:
- NonStreamCodeGeneratorInterface
Inlines all references in a function application's parameters according to inlining information from ExtendedSpecification
Inlines all references in a function application's parameters according to inlining information from ExtendedSpecification
Attributes
- args
The arguments applied to e
- defContext
Definition context depicting all var names in the current scope to their definition expression
- Returns:
The modified parameter expressions
- Inherited from:
- NonStreamCodeGeneratorInterface
Inlines all ExpressionRef (variable references) to variables in the inlining set of the ExtendedSpecification in a DefinitionExpression except those of function type
Inlines all ExpressionRef (variable references) to variables in the inlining set of the ExtendedSpecification in a DefinitionExpression except those of function type
Attributes
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The expression where variable references should be inlined
- Returns:
The modified expression
- Inherited from:
- NonStreamCodeGeneratorInterface
Applies inlineVars on all statements in body
Applies inlineVars on all statements in body
Attributes
- body
Sequence of statements where inlineVars is applied on
- defContext
Definition context depicting all var names in the current scope to their definition expression
- Returns:
The modified body
- Inherited from:
- NonStreamCodeGeneratorInterface
Inlines all ExpressionRef (variable references) to variables in the inlining set of the ExtendedSpecification in an ExpressionOrRef except those of function type
Inlines all ExpressionRef (variable references) to variables in the inlining set of the ExtendedSpecification in an ExpressionOrRef except those of function type
Attributes
- defContext
Definition context depicting all var names in the current scope to their definition expression
- e
The expression where variable references should be inlined
- Returns:
The modified expression
- Inherited from:
- NonStreamCodeGeneratorInterface
Inherited fields
Set of identifiers which are assigned with final assignments. If an assignment uses exclusively existing assignments it can also be finally assigned Otherwise (in case of recursion) it must be assigned with a dummy default value first
Set of identifiers which are assigned with final assignments. If an assignment uses exclusively existing assignments it can also be finally assigned Otherwise (in case of recursion) it must be assigned with a dummy default value first
Attributes
- Inherited from:
- NonStreamCodeGeneratorInterface