Sign in

    alicedhaha/moonrcinspect/src/parser does not have a README file

    AstCapacitor

    pub(all) struct AstCapacitor {
    id : Int
    first : String
    second : String?
    value : Double
    span :
    SourceSpan

    } derive(
    Debug
    )

    AstConnection

    pub(all) struct AstConnection {
    kind : String
    name : String
    direction : String
    coordinate : (Double, Double)?
    load : Double?
    driving_cell : String?
    span :
    SourceSpan

    } derive(
    Debug
    )

    AstHeader

    pub(all) struct AstHeader {
    keyword : String
    values : Array[String]
    span :
    SourceSpan

    } derive(
    Debug
    )

    AstNameMapEntry

    pub(all) struct AstNameMapEntry {
    index : Int
    name : String
    span :
    SourceSpan

    } derive(
    Debug
    )

    AstNet

    pub(all) struct AstNet {
    name : String
    declared_capacitance : Double
    connections : Array[AstConnection]
    capacitors : Array[AstCapacitor]
    resistors : Array[AstResistor]
    span :
    SourceSpan

    } derive(
    Debug
    )

    AstPort

    pub(all) struct AstPort {
    name : String
    direction : String
    coordinate : (Double, Double)?
    span :
    SourceSpan

    } derive(
    Debug
    )

    AstResistor

    pub(all) struct AstResistor {
    id : Int
    first : String
    second : String
    value : Double
    span :
    SourceSpan

    } derive(
    Debug
    )

    Section

    SpefAst

    pub(all) struct SpefAst {
    headers : Array[AstHeader]
    name_map : Array[AstNameMapEntry]
    ports : Array[AstPort]
    nets : Array[AstNet]
    } derive(
    Debug
    )

    Token

    pub(all) struct Token {
    text : String
    quoted : Bool
    span :
    SourceSpan

    } derive(Eq,
    Debug
    )

    TokenLine

    pub(all) struct TokenLine {
    number : Int
    tokens : Array[Token]
    } derive(Eq,
    Debug
    )

    has_errors

    fn has_errors(result : ParseResult) -> Bool

    lex

    fn lex(source : String, file? : String) -> LexResult

    Tokenizes SPEF text while preserving physical lines and source ranges.

    SPEF is line-oriented, but token boundaries are not obtained with a simple whitespace split: quoted strings, escapes, comments and exact columns are handled explicitly.

    parse

    fn parse(source : String, file? : String) -> ParseResult

    Parse SPEF text into both a syntax tree and normalized RC model.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io