Skip to content

std/jule/parser ​

Index ​

Variables
fn ParseFile(mut f: &token::FileSet, mut tokens: []&token::Token): &FileInfo
struct FileInfo
struct PackageInfo

Variables ​

jule
const TokenOptions = token::Standard

Token scan options that enables tokenization suitable for the parser.


jule
const (
	SF_STOP     = 1 << iota // Stops scanning.
	SF_SKIPREAD             // Skips next call for once and reports true.
)

Scanner flags.

ParseFile ​

jule
fn ParseFile(mut f: &token::FileSet, mut tokens: []&token::Token): &FileInfo

Parses FileSet's tokens and builds AST. Returns nil if f is nil. FileSet should be tokenized according to [TokenOptions].

FileInfo ​

jule
struct FileInfo {
	AST:    &ast::AST
	Errors: []log::Log
}

Stores information about file parsing.

PackageInfo ​

jule
struct PackageInfo {
	Files: []&FileInfo
}

Stores information about package parsing.