parser

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package parser turns .gwdk source files into syntax trees.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseComponent

func ParseComponent(src []byte) (gwdkir.Component, error)

ParseComponent extracts component metadata and top-level block declarations.

func ParseLayout

func ParseLayout(path string, src []byte) (gwdkir.Layout, error)

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.

func ParsePage

func ParsePage(source []byte) (gwdkir.Page, error)

ParsePage extracts page metadata and top-level block declarations.

func ParsePageWithDefaultID added in v0.2.6

func ParsePageWithDefaultID(source []byte, defaultID string) (gwdkir.Page, error)

ParsePageWithDefaultID extracts page metadata and uses defaultID when the source omits @page.

Types

type APIStatement

type APIStatement = gwdkast.APIStatement

type ActionStatement

type ActionStatement = gwdkast.ActionStatement

type BuildCall

type BuildCall = gwdkast.BuildCall

type Emit added in v0.1.5

type Emit = gwdkast.Emit

type EmitParam added in v0.1.5

type EmitParam = gwdkast.EmitParam

type Export added in v0.1.5

type Export = gwdkast.Export

type GoFuncRef added in v0.1.5

type GoFuncRef = gwdkast.GoFuncRef

type GoTypeRef added in v0.1.5

type GoTypeRef = gwdkast.GoTypeRef

type LiteralRecord

type LiteralRecord = gwdkast.LiteralRecord

type Prop added in v0.1.5

type Prop = gwdkast.Prop

type StateContract added in v0.1.5

type StateContract = gwdkast.StateContract

type SyntaxAnnotation

type SyntaxAnnotation = gwdkast.Annotation

type SyntaxBlock

type SyntaxBlock = gwdkast.Block

type SyntaxEndpoint added in v0.1.5

type SyntaxEndpoint = gwdkast.Endpoint

type SyntaxFile

type SyntaxFile = gwdkast.File

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 SyntaxImport = gwdkast.Import

type SyntaxPackage added in v0.1.5

type SyntaxPackage = gwdkast.Package

type SyntaxUse added in v0.1.5

type SyntaxUse = gwdkast.Use

type WASMContract added in v0.1.5

type WASMContract = gwdkast.WASMContract

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL