Package org.eclipse.xtend.core.compiler
Class XtendCompiler.RichStringPrepareCompiler
- java.lang.Object
-
- org.eclipse.xtend.core.richstring.AbstractRichStringPartAcceptor
-
- org.eclipse.xtend.core.richstring.AbstractRichStringPartAcceptor.ForLoopOnce
-
- org.eclipse.xtend.core.compiler.XtendCompiler.RichStringPrepareCompiler
-
- All Implemented Interfaces:
IRichStringPartAcceptor
- Enclosing class:
- XtendCompiler
public class XtendCompiler.RichStringPrepareCompiler extends AbstractRichStringPartAcceptor.ForLoopOnce
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtend.core.richstring.AbstractRichStringPartAcceptor
AbstractRichStringPartAcceptor.ForLoopOnce
-
-
Constructor Summary
Constructors Constructor Description RichStringPrepareCompiler(org.eclipse.xtext.xbase.compiler.output.ITreeAppendable appendable, java.lang.String variableName, RichString richString)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptElse()
Announces that anvoid
acceptElseIfCondition(org.eclipse.xtext.xbase.XExpression condition)
Announces that anvoid
acceptEndFor(org.eclipse.xtext.xbase.XExpression after, java.lang.CharSequence indentation)
Announces that anvoid
acceptEndIf()
Announces that anvoid
acceptExpression(org.eclipse.xtext.xbase.XExpression expression, java.lang.CharSequence indentation)
Announces that anvoid
acceptForLoop(org.eclipse.xtext.common.types.JvmFormalParameter parameter, org.eclipse.xtext.xbase.XExpression expression)
Announces that avoid
acceptIfCondition(org.eclipse.xtext.xbase.XExpression condition)
Announces that anvoid
acceptSemanticLineBreak(int charCount, RichStringLiteral origin, boolean controlStructureSeen)
Indicates a semantic line break in a rich string literal.void
acceptSemanticText(java.lang.CharSequence text, RichStringLiteral origin)
void
acceptTemplateLineBreak(int charCount, RichStringLiteral origin)
Indicates a template line break in a rich string literal.boolean
forLoopHasNext(org.eclipse.xtext.xbase.XExpression before, org.eclipse.xtext.xbase.XExpression separator, java.lang.CharSequence indentation)
Queried to determine whether the body of the for-loop should be evaluated (again).protected void
popAppendable()
protected void
pushAppendable(org.eclipse.emf.ecore.EObject traceInfo)
protected void
setCurrentAppendable(RichStringLiteral origin)
protected void
writeElse()
protected void
writeExpression(org.eclipse.xtext.xbase.XExpression expression, java.lang.CharSequence indentation, boolean immediate)
protected void
writeIf(org.eclipse.xtext.xbase.XExpression condition)
-
Methods inherited from class org.eclipse.xtend.core.richstring.AbstractRichStringPartAcceptor
acceptTemplateText, announceNextLiteral
-
-
-
-
Constructor Detail
-
RichStringPrepareCompiler
public RichStringPrepareCompiler(org.eclipse.xtext.xbase.compiler.output.ITreeAppendable appendable, java.lang.String variableName, RichString richString)
-
-
Method Detail
-
acceptSemanticLineBreak
public void acceptSemanticLineBreak(int charCount, RichStringLiteral origin, boolean controlStructureSeen)
Description copied from interface:IRichStringPartAcceptor
Indicates a semantic line break in a rich string literal.- Specified by:
acceptSemanticLineBreak
in interfaceIRichStringPartAcceptor
- Overrides:
acceptSemanticLineBreak
in classAbstractRichStringPartAcceptor
- Parameters:
charCount
- the number of characters in the line break.origin
- the instance holding the complete text value that contains the line break.controlStructureSeen
- whether or not the line break occurs in a line that contains a control structure.
-
setCurrentAppendable
protected void setCurrentAppendable(RichStringLiteral origin)
-
acceptTemplateLineBreak
public void acceptTemplateLineBreak(int charCount, RichStringLiteral origin)
Description copied from interface:IRichStringPartAcceptor
Indicates a template line break in a rich string literal.- Specified by:
acceptTemplateLineBreak
in interfaceIRichStringPartAcceptor
- Overrides:
acceptTemplateLineBreak
in classAbstractRichStringPartAcceptor
- Parameters:
charCount
- the number of characters in the line break.origin
- the instance holding the complete text value that contains the line break.
-
acceptSemanticText
public void acceptSemanticText(java.lang.CharSequence text, RichStringLiteral origin)
- Specified by:
acceptSemanticText
in interfaceIRichStringPartAcceptor
- Overrides:
acceptSemanticText
in classAbstractRichStringPartAcceptor
- Parameters:
text
- the semantic text. May not benull
.origin
- the value holder for the full text or null, if unknown.
-
acceptIfCondition
public void acceptIfCondition(org.eclipse.xtext.xbase.XExpression condition)
Description copied from interface:IRichStringPartAcceptor
Announces that an«IF condition»
has been consumed.- Specified by:
acceptIfCondition
in interfaceIRichStringPartAcceptor
- Overrides:
acceptIfCondition
in classAbstractRichStringPartAcceptor
- Parameters:
condition
- the condition of anRichStringIf
.
-
pushAppendable
protected void pushAppendable(org.eclipse.emf.ecore.EObject traceInfo)
-
popAppendable
protected void popAppendable()
-
acceptElseIfCondition
public void acceptElseIfCondition(org.eclipse.xtext.xbase.XExpression condition)
Description copied from interface:IRichStringPartAcceptor
Announces that an«ELSEIF condition»
has been consumed.- Specified by:
acceptElseIfCondition
in interfaceIRichStringPartAcceptor
- Overrides:
acceptElseIfCondition
in classAbstractRichStringPartAcceptor
- Parameters:
condition
- the condition of anRichStringElseIf
.
-
writeIf
protected void writeIf(org.eclipse.xtext.xbase.XExpression condition)
-
writeElse
protected void writeElse()
-
acceptElse
public void acceptElse()
Description copied from interface:IRichStringPartAcceptor
Announces that an«ELSE»
has been consumed.- Specified by:
acceptElse
in interfaceIRichStringPartAcceptor
- Overrides:
acceptElse
in classAbstractRichStringPartAcceptor
-
acceptEndIf
public void acceptEndIf()
Description copied from interface:IRichStringPartAcceptor
Announces that an«ENDIF»
has been consumed.- Specified by:
acceptEndIf
in interfaceIRichStringPartAcceptor
- Overrides:
acceptEndIf
in classAbstractRichStringPartAcceptor
-
acceptForLoop
public void acceptForLoop(org.eclipse.xtext.common.types.JvmFormalParameter parameter, org.eclipse.xtext.xbase.XExpression expression)
Description copied from interface:IRichStringPartAcceptor
Announces that a«FOR parameter: expression»
has been consumed.- Specified by:
acceptForLoop
in interfaceIRichStringPartAcceptor
- Overrides:
acceptForLoop
in classAbstractRichStringPartAcceptor.ForLoopOnce
- Parameters:
parameter
- the declared parameter in the for-loop.expression
- the expression that produces anIterable
.
-
forLoopHasNext
public boolean forLoopHasNext(org.eclipse.xtext.xbase.XExpression before, org.eclipse.xtext.xbase.XExpression separator, java.lang.CharSequence indentation)
Description copied from interface:IRichStringPartAcceptor
Queried to determine whether the body of the for-loop should be evaluated (again).- Specified by:
forLoopHasNext
in interfaceIRichStringPartAcceptor
- Overrides:
forLoopHasNext
in classAbstractRichStringPartAcceptor.ForLoopOnce
- Parameters:
before
- the expression that should be evaluated prior to the first item of the loop, if any.separator
- the expression that should be evaluated prior to the second and all subsequent items of the loop.indentation
- the additional indentation for any line besides the first one.- Returns:
true
if the for-loop body should be evaluated.
-
acceptEndFor
public void acceptEndFor(org.eclipse.xtext.xbase.XExpression after, java.lang.CharSequence indentation)
Description copied from interface:IRichStringPartAcceptor
Announces that an«ENDFOR»
has been consumed.- Specified by:
acceptEndFor
in interfaceIRichStringPartAcceptor
- Overrides:
acceptEndFor
in classAbstractRichStringPartAcceptor.ForLoopOnce
- Parameters:
after
- the expression that should be evaluated after the last item of the loop, if any.indentation
- the additional indentation for any line besides the first one.
-
acceptExpression
public void acceptExpression(org.eclipse.xtext.xbase.XExpression expression, java.lang.CharSequence indentation)
Description copied from interface:IRichStringPartAcceptor
Announces that an«expression»
has been consumed. If the expression's evaluation result contains more than one line, any line besides the first one may be prefixed with the given indentation.- Specified by:
acceptExpression
in interfaceIRichStringPartAcceptor
- Overrides:
acceptExpression
in classAbstractRichStringPartAcceptor
- Parameters:
expression
- the consumed expression. May not benull
.indentation
- the additional indentation for any line besides the first one.
-
writeExpression
protected void writeExpression(org.eclipse.xtext.xbase.XExpression expression, java.lang.CharSequence indentation, boolean immediate)
-
-