Files @ 33aa370aeb00
Branch filter:

Location: CSY/reowolf/src/protocol/lexer2.rs - annotation

33aa370aeb00 716 B application/rls-services+xml Show Source Show as Raw Download as Raw
MH
Finished tokenizer, pending new lexer
use crate::protocol::Heap;
use crate::protocol::tokenizer::{TokenBuffer, Token};
use crate::protocol::input_source2::{InputSource2 as InputSource, ParseError};

struct Ctx<'a> {
    heap: &'a mut Heap,
    source: &'a InputSource,
    tokens: &'a TokenBuffer,
}

// Lexes definitions. Should be the first pass over each of the module files 
// after tokenization. Only once all definitions are parsed can we do the full
// AST creation pass.
struct LexerDefinitions {

}

impl LexerDefinitions {
    pub(crate) fn parse(ctx: &mut Ctx) -> Result<(), ParseError> {
        debug_assert!(ctx.tokens.ranges.len() > 0);
    }

    pub(crate) fn parse_definition(heap: &mut Heap, source: &InputSource, range: &TokenRang)
}