Documentation
¶
Overview ¶
Package parser implements TypeRB's handwritten recursive-descent and Pratt parsers. The syntax tree is independent from parser internals and retains source spans for diagnostics, formatting, and Ruby interoperability.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSXComponentIdentifierAt ¶ added in v0.3.2
JSXComponentIdentifierAt returns the component identifier under an editor cursor. JSX is lexed as one literal token, so semantic tooling uses the JSX parser's component-name boundaries instead of duplicating JSX syntax rules.
func Parse ¶
func Parse(source []byte) (*ast.Program, []diagnostic.Diagnostic)
func ParseJSXToken ¶ added in v0.3.15
func ParseJSXToken(root token.Token) (*ast.JSXElement, bool)
ParseJSXToken rebuilds the structured JSX node represented by one lossless lexer token. Tooling that prints token-preserving source can use the shared JSX grammar without duplicating it.
Types ¶
Click to show internal directories.
Click to hide internal directories.