1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package muesli
- import (
- _ "bytes"
- _ "errors"
- _ "fmt"
- _ "io"
- _ "reflect"
- _ "runtime"
- _ "strings"
- _ "unicode"
- _ "io"
- _ "os"
- _ "bufio"
- _ "unicode"
- // "gitlab.com/beoran/woe/graphviz"
- // _ "gitlab.com/beoran/woe/monolog"
- "gitlab.com/beoran/gdast/tree"
- )
- type AstKind int
- const (
- AstKindProgram = AstKind(iota)
- AstKindStatements
- AstKindStatement
- AstKindCommand
- AstKindArguments
- AstKindBlock
- AstKindList
- AstKindCapture
- AstKindWordValue
- AstKindWord
- AstKindType
- AstKindValue
- AstKindEox
- AstKindError
- )
- /* AST node kind */
- type Ast struct {
- tree.Node
- AstKind
- * Token
- }
- type Parser struct {
- Lexer
- Ast
- }
- func (parser * Parser) ParseProgram() error {
- /*
- for parser.Position < len(Input) {
- }
- */
- return nil
- }
- func (parser * Parser) Parse() (Ast, error) {
- parser.Index = 0
- err := parser.ParseProgram()
- return parser.Ast, err
- }
|