public class ReturnAnalyzer extends Object
ReturnAnalyzer class analyzes body of some TBasic function for correctness of returns sequence and
return types and detects unreachable code.| Constructor and Description |
|---|
ReturnAnalyzer(IOpenClass returnType,
AlgorithmCompiler compiler)
Create an instance of
ReturnAnalyzer for analysis of some function from TBasic compiler. |
| Modifier and Type | Method and Description |
|---|---|
SuitablityAsReturn |
analyze(List<AlgorithmTreeNode> nodesToAnalyze)
Make full analysis of correctness of returns sequence and return types and detects unreachable code.
|
IOpenClass |
getReturnType() |
public ReturnAnalyzer(IOpenClass returnType, AlgorithmCompiler compiler)
ReturnAnalyzer for analysis of some function from TBasic compiler.returnType - Expected return type of functioncompiler - Associated TBasic compiler.public SuitablityAsReturn analyze(List<AlgorithmTreeNode> nodesToAnalyze) throws SyntaxNodeException
nodesToAnalyze - Body of some function to analyze.SyntaxNodeException - If function contains unreachable code or incorrect return type.public IOpenClass getReturnType()
Copyright © 2004–2019 OpenL Tablets. All rights reserved.