kicad_sexpr/parse

Types

pub type ParseError {
  UnexpectedEndOfFile
  MissingTokenName
  UnterminatedString(got: String)
  UnexpectedTrailingData(got: BitArray)
  InvalidUtf8Character(got: BitArray)
}

Constructors

  • UnexpectedEndOfFile
  • MissingTokenName
  • UnterminatedString(got: String)
  • UnexpectedTrailingData(got: BitArray)
  • InvalidUtf8Character(got: BitArray)
pub type SExpr {
  Token(name: String, attributes: List(SExpr))
  String(String)
  Int(Int)
  Float(Float)
  Name(String)
}

Constructors

  • Token(name: String, attributes: List(SExpr))
  • String(String)
  • Int(Int)
  • Float(Float)
  • Name(String)

Values

pub fn run(source: BitArray) -> Result(SExpr, ParseError)
pub fn sexpr_to_pretty_string(sexpr: SExpr) -> String
Search Document