Documentation
¶
Overview ¶
Package parser turns .gwdk source files into syntax trees.
Index ¶
- func ParseComponent(src []byte) (gwdkir.Component, error)
- func ParseLayout(path string, src []byte) (gwdkir.Layout, error)
- func ParsePage(source []byte) (gwdkir.Page, error)
- func ParsePageWithDefaultID(source []byte, defaultID string) (gwdkir.Page, error)
- type APIStatement
- type ActionStatement
- type BuildCall
- type Emit
- type EmitParam
- type Export
- type GoFuncRef
- type GoTypeRef
- type LiteralRecord
- type Prop
- type StateContract
- type SyntaxAnnotation
- type SyntaxBlock
- type SyntaxEndpoint
- type SyntaxFile
- type SyntaxFragmentEndpoint
- type SyntaxImport
- type SyntaxPackage
- type SyntaxUse
- type WASMContract
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseComponent ¶
ParseComponent extracts component metadata and top-level block declarations.
func ParseLayout ¶
ParseLayout extracts layout metadata and top-level block declarations. Layout identity is derived from the file name (`root.layout.gwdk` -> `root`); any `@layout` annotation declares parent layouts this layout nests within.
Types ¶
type APIStatement ¶
type APIStatement = gwdkast.APIStatement
type ActionStatement ¶
type ActionStatement = gwdkast.ActionStatement
type LiteralRecord ¶
type LiteralRecord = gwdkast.LiteralRecord
type StateContract ¶ added in v0.1.5
type StateContract = gwdkast.StateContract
type SyntaxAnnotation ¶
type SyntaxAnnotation = gwdkast.Annotation
type SyntaxBlock ¶
type SyntaxEndpoint ¶ added in v0.1.5
type SyntaxFile ¶
func ParseSyntax ¶
func ParseSyntax(src []byte) (SyntaxFile, error)
ParseSyntax parses a .gwdk source file into a typed syntax AST for the current compiler subset.
type SyntaxFragmentEndpoint ¶ added in v0.1.5
type SyntaxFragmentEndpoint = gwdkast.FragmentEndpoint
type SyntaxImport ¶
type SyntaxPackage ¶ added in v0.1.5
type WASMContract ¶ added in v0.1.5
type WASMContract = gwdkast.WASMContract
Click to show internal directories.
Click to hide internal directories.