Modifier and Type | Field and Description |
---|---|
private NStr | |
private int | |
private String | |
private String | |
private static final String | IDENT
Matches an unqualified Python identifier. |
private Linker | |
private static final int | MIN_TYPE_NAME_LENGTH
Only try to resolve possible qnames of at least this length. |
private Set | |
private boolean | |
private Scope | |
private List | |
private static final Pattern | TYPE_NAME
Matches probable type names. |
Access | Constructor and Description |
---|---|
public | DocStringParser(String
the doc string or doc-comment text comment, NStr the AST node for the doc string node, Linker linker)Constructor. |
Modifier and Type | Method and Description |
---|---|
private void | |
private void | |
private void | |
public List | Returns: the non-null but possibly empty list of additional
styles for the doc string.Main entry point. |
public boolean | |
private void | |
public void | setResolveReferences(boolean
true to do name resolution, false
to guess purely based on syntax in the doc string.
Pass false if you're using the highlighter to
syntax-highlight a file (i.e. no code graph or indexing.)Configures whether to highlight syntactically or semantically. |
docNode | back to summary |
---|---|
private NStr docNode |
docOffset | back to summary |
---|---|
private int docOffset |
docString | back to summary |
---|---|
private String docString |
file | back to summary |
---|---|
private String file |
IDENT | back to summary |
---|---|
private static final String IDENT Matches an unqualified Python identifier. |
linker | back to summary |
---|---|
private Linker linker |
MIN_TYPE_NAME_LENGTH | back to summary |
---|---|
private static final int MIN_TYPE_NAME_LENGTH Only try to resolve possible qnames of at least this length. Helps cut down on noise. |
offsets | back to summary |
---|---|
private Set<Integer> offsets |
resolveReferences | back to summary |
---|---|
private boolean resolveReferences |
scope | back to summary |
---|---|
private Scope scope |
styles | back to summary |
---|---|
private List<StyleRun> styles |
TYPE_NAME | back to summary |
---|---|
private static final Pattern TYPE_NAME Matches probable type names. Does loose matching; caller must do more checks. |
DocStringParser | back to summary |
---|---|
public DocStringParser(String comment, NStr node, Linker linker) Constructor. |
addStyle | back to summary |
---|---|
private void addStyle(int beg, int len, NBinding nb) |
addStyle | back to summary |
---|---|
private void addStyle(int beg, int len, StyleRun. |
checkForReference | back to summary |
---|---|
private void checkForReference(int offset, String qname) Look for the name in the current scope. If found, and its qname is a valid binding in the graph, record a reference. |
highlight | back to summary |
---|---|
public List Main entry point. |
isResolvingReferences | back to summary |
---|---|
public boolean isResolvingReferences() |
scanCommentForTypeNames | back to summary |
---|---|
private void scanCommentForTypeNames() Try to match potential type names against the code graph. If any match, graph references and styles are added for them. |
setResolveReferences | back to summary |
---|---|
public void setResolveReferences(boolean resolve) Configures whether to highlight syntactically or semantically.
|