gsh/evaluator/parser

Types

pub type ClassifyResult {
  Items(List(Item))
  ClassifyEmpty
  ClassifyIncomplete
  ClassifyError(String)
}

Constructors

  • Items(List(Item))
  • ClassifyEmpty
  • ClassifyIncomplete
  • ClassifyError(String)
pub type DefKind {
  FnDef
  TypeDef
  ConstDef
}

Constructors

  • FnDef
  • TypeDef
  • ConstDef
pub type ImportSpec {
  ImportSpec(
    module: String,
    alias: option.Option(String),
    types: List(Unqualified),
    values: List(Unqualified),
  )
}

Constructors

pub type Item {
  ImportItem(module: String, source: String)
  DefinitionItem(name: String, kind: DefKind, source: String)
  ValueItem(names: List(String), rhs: String, is_assert: Bool)
}

Constructors

  • ImportItem(module: String, source: String)
  • DefinitionItem(name: String, kind: DefKind, source: String)
  • ValueItem(names: List(String), rhs: String, is_assert: Bool)
pub type Unqualified {
  Unqualified(name: String, alias: option.Option(String))
}

Constructors

Values

pub fn get_imported_names(src: String) -> List(String)
pub fn merge_imports(imports: List(String)) -> List(String)
pub fn parse(src: String) -> ClassifyResult
pub fn pattern_names(pattern: glance.Pattern) -> List(String)
Search Document