io.sarl.lang.extralanguage.compiler
Interface IExpressionGenerator
All Known Implementing Classes:
AbstractExpressionGenerator, PyExpressionGenerator
interface IExpressionGenerator
Generator of XExpression.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.6
Action Summary
Modifier and type Action and description
default org.eclipse.xtext.xbase.XExpression generate(XExpression,IAppendable,IExtraLanguageGeneratorContext)
Generate the code for the given XExpression.
abstract org.eclipse.xtext.xbase.XExpression generate(XExpression,LightweightTypeReference,IAppendable,IExtraLanguageGeneratorContext)
Generate the code for the given XExpression.
abstract ExtraLanguageFeatureNameConverter getFeatureNameConverter(IExtraLanguageGeneratorContext)
Replies the feature name converter.
abstract ExtraLanguageTypeConverter getTypeConverter(IExtraLanguageGeneratorContext)
Replies the type converter.
Action Details
generate(XExpression,IAppendable,IExtraLanguageGeneratorContext)
def generate(XExpression,IAppendable,IExtraLanguageGeneratorContext) : org.eclipse.xtext.xbase.XExpression
Generate the code for the given XExpression.

The given expression is not expecting to be returned by a function.
Parameters:
expression - the expression to be generated.
output - the output.
context - the generator context.
Returns:
the lastly encountered expression.
generate(XExpression,LightweightTypeReference,IAppendable,IExtraLanguageGeneratorContext)
def generate(XExpression,LightweightTypeReference,IAppendable,IExtraLanguageGeneratorContext) : org.eclipse.xtext.xbase.XExpression
Generate the code for the given XExpression.
Parameters:
expression - the expression to be generated.
expectedType - the type that is expected for the expression in the context of a function return.
output - the output.
context - the generator context.
Returns:
the lastly encountered expression.
getFeatureNameConverter(IExtraLanguageGeneratorContext)
def getFeatureNameConverter(IExtraLanguageGeneratorContext) : ExtraLanguageFeatureNameConverter
Replies the feature name converter.
Parameters:
context - the context of the generation.
Returns:
the converter.
getTypeConverter(IExtraLanguageGeneratorContext)
def getTypeConverter(IExtraLanguageGeneratorContext) : ExtraLanguageTypeConverter
Replies the type converter.
Parameters:
context - the context of the generation.
Returns:
the converter.