Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed Apr 11, 2024
1 parent e3cb284 commit f79d01c
Show file tree
Hide file tree
Showing 9 changed files with 1,702 additions and 502 deletions.
157 changes: 114 additions & 43 deletions src/compiler.rs

Large diffs are not rendered by default.

1,015 changes: 686 additions & 329 deletions src/compiler/syntax.rs

Large diffs are not rendered by default.

213 changes: 157 additions & 56 deletions src/compiler/syntax/token.rs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn main() {
let mut sources = Sources::default();
let mut compiler = Compiler::default();
loop {
let line_num = sources.next_id().get().map_or(0, NonZeroUsize::get);
let line_num = sources.len() + 1;
match editor.readline(&format!("{line_num}> ")) {
Ok(line) => {
let _err = editor.append_history(&history_path);
Expand Down Expand Up @@ -184,8 +184,8 @@ impl Validator for Muse {
match parse(source) {
Ok(_) => Ok(ValidationResult::Valid(None)),
Err(Ranged(
muse::compiler::syntax::Error::UnexpectedEof
| muse::compiler::syntax::Error::MissingEnd(_),
muse::compiler::syntax::ParseError::UnexpectedEof
| muse::compiler::syntax::ParseError::MissingEnd(_),
_,
)) => Ok(ValidationResult::Incomplete),
Err(err) => {
Expand Down
Loading

0 comments on commit f79d01c

Please sign in to comment.