Documentation
¶
Index ¶
- func HTMLAttrName(name string) string
- type ArrayExpr
- type ArrowFn
- type AwaitExpr
- type BinaryExpr
- type BlockStmt
- type BreakStmt
- type CallExpr
- type CaseClause
- type CatchClause
- type ConditionalExpr
- type ContinueStmt
- type DoWhileStmt
- type DynamicImport
- type ExportStmt
- type Expr
- type ExprStmt
- type FnDecl
- type ForInStmt
- type ForStmt
- type Identifier
- type IfStmt
- type ImportMetaExpr
- type ImportStmt
- type JSXAttr
- type JSXChild
- type JSXClosing
- type JSXElement
- type JSXElementChild
- type JSXExprContainer
- type JSXFragment
- type JSXFragmentChild
- type JSXOpening
- type JSXText
- type LitKind
- type Literal
- type MemberExpr
- type NamedImport
- type NewExpr
- type Node
- type ObjectExpr
- type ObjectProp
- type Param
- type Pos
- type Program
- type ReturnStmt
- type Stmt
- type SwitchStmt
- type TemplateExpr
- type ThisExpr
- type ThrowStmt
- type TryStmt
- type TypeAssertion
- type UnaryExpr
- type VarDecl
- type VarKind
- type VarStmt
- type WhileStmt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTMLAttrName ¶
HTMLAttrName maps a JSX attribute name to its HTML attribute name, translating React-style camelCase aliases (className, htmlFor, tabIndex, SVG props, ...) to their DOM equivalents. Unknown names pass through unchanged.
Types ¶
type BinaryExpr ¶
func (*BinaryExpr) Pos ¶
func (b *BinaryExpr) Pos() Pos
type CallExpr ¶
type CaseClause ¶
type CatchClause ¶
type ConditionalExpr ¶
func (*ConditionalExpr) Pos ¶
func (c *ConditionalExpr) Pos() Pos
type ContinueStmt ¶
func (*ContinueStmt) Pos ¶
func (c *ContinueStmt) Pos() Pos
type DoWhileStmt ¶
func (*DoWhileStmt) Pos ¶
func (d *DoWhileStmt) Pos() Pos
type DynamicImport ¶
func (*DynamicImport) Pos ¶
func (d *DynamicImport) Pos() Pos
type ExportStmt ¶
type ExportStmt struct {
Position Pos
Declaration Stmt
Default bool
Local string
StarReexport bool // export * from 'source'
Namespace string // export * as Namespace from 'source'
ReexportSource string // source path for re-exports (export * from '...' or export { X } from '...')
}
func (*ExportStmt) Pos ¶
func (e *ExportStmt) Pos() Pos
type FnDecl ¶
type ForInStmt ¶
type ForInStmt struct {
Position Pos
Left Expr
Right Expr
Body []Stmt
IsForOf bool
// Keyword is the declaration keyword of the loop binding ("const", "let",
// "var"), or "" for a bare assignment target such as `for (x in obj)`. The
// parser records it so codegen can reproduce the original binding form.
Keyword string
}
type Identifier ¶
func (*Identifier) Pos ¶
func (i *Identifier) Pos() Pos
type ImportMetaExpr ¶
type ImportMetaExpr struct {
Position Pos
}
func (*ImportMetaExpr) Pos ¶
func (im *ImportMetaExpr) Pos() Pos
type ImportStmt ¶
type ImportStmt struct {
Position Pos
Default string
Named []NamedImport
Namespace string
Source string
}
func (*ImportStmt) Pos ¶
func (i *ImportStmt) Pos() Pos
type JSXClosing ¶
type JSXClosing struct {
Name string
}
type JSXElement ¶
type JSXElement struct {
Position Pos
Opening *JSXOpening
Children []JSXChild
Closing *JSXClosing
}
func (*JSXElement) Pos ¶
func (j *JSXElement) Pos() Pos
type JSXElementChild ¶
type JSXElementChild struct {
Element *JSXElement
}
type JSXExprContainer ¶
type JSXExprContainer struct {
Expression Expr
}
type JSXFragment ¶
func (*JSXFragment) Pos ¶
func (j *JSXFragment) Pos() Pos
type JSXFragmentChild ¶
type JSXFragmentChild struct {
Fragment *JSXFragment
}
type JSXOpening ¶
type MemberExpr ¶
func (*MemberExpr) Pos ¶
func (m *MemberExpr) Pos() Pos
type NamedImport ¶
type ObjectExpr ¶
type ObjectExpr struct {
Position Pos
Properties []*ObjectProp
}
func (*ObjectExpr) Pos ¶
func (o *ObjectExpr) Pos() Pos
type ObjectProp ¶
type Param ¶
type Param struct {
Position Pos
Name string
Default Expr // Store the expression here
IsRest bool // Added this
// Pattern holds the source text of a destructuring parameter pattern
// (e.g. `{items, label}` or `[a, b]`). When set, Name is the "{...}" sentinel
// and codegen emits this pattern so the destructured locals are bound.
Pattern string
}
type ReturnStmt ¶
func (*ReturnStmt) Pos ¶
func (r *ReturnStmt) Pos() Pos
type SwitchStmt ¶
type SwitchStmt struct {
Position Pos
Discriminant Expr
Cases []*CaseClause
}
func (*SwitchStmt) Pos ¶
func (s *SwitchStmt) Pos() Pos
type TemplateExpr ¶
func (*TemplateExpr) Pos ¶
func (t *TemplateExpr) Pos() Pos
type TypeAssertion ¶
func (*TypeAssertion) Pos ¶
func (t *TypeAssertion) Pos() Pos
Click to show internal directories.
Click to hide internal directories.