Class LocalScopeNames
java.lang.Object
org.ek9lang.compiler.common.LocalScopeNames
THE names of the
LocalScopes phase 1 creates, and the only place their text is spelt.
The prefixes are a de-facto wire format: compiler-services (location resolution and the scope chain)
recognises a scope by the start of its name. Use the constants and the is* tests; never write
"If-line-" or startsWith("Returning-param-") again, in either module.
Two shapes exist. A structural scope is <Prefix><line> (atLine(String, IToken)) or
<Prefix><line>-<position> (atPosition(String, IToken)); an anonymous block scope is
Line-<line>-Position-<position> (block(IToken)).
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringA structural scope named for the line the construct starts on.static StringatPosition(String prefix, IToken token) A structural scope named for the line and position the construct starts at.static StringThe name of an anonymous block scope at a token position.static booleanstatic booleanisReturningParam(String scopeName)
-
Field Details
-
IF_LINE
- See Also:
-
CATCH_LINE
- See Also:
-
FINALLY_LINE
- See Also:
-
TERNARY_PART_LINE
- See Also:
-
STREAM_FOR_LINE
- See Also:
-
RETURNING_PARAM
- See Also:
-
-
Method Details
-
atLine
-
atPosition
-
block
-
isIf
-
isReturningParam
-