public static final class BlockScopeDetector.BlockScopeResult extends Object
Pp2TokenStream.| Modifier and Type | Method and Description |
|---|---|
int |
depthAt(int index)
Block nesting depth at token
index (0 = top level). |
int |
getMaxDepth()
Maximum nesting depth observed across the stream.
|
List<BlockScopeDetector.BlockScope> |
getScopes()
All detected scopes, in close order (then unclosed frames).
|
int |
getUnclosedCount()
Number of frames still open at end of input (unbalanced openers).
|
BlockKind |
kindAt(int index)
Kind of block the token at
index sits directly inside. |
int |
size()
Number of tokens covered.
|
public int size()
public int depthAt(int index)
index (0 = top level).public int getMaxDepth()
public int getUnclosedCount()
public List<BlockScopeDetector.BlockScope> getScopes()
-1 if never closed),
kind, and the enclosing depth at which it sits.