valhallac

Compiler for set-theoretic programming language.
git clone git://git.knutsen.co/valhallac
Log | Files | Refs | README | LICENSE

commit 13ad855b3810fa731f8bb1449542b2f2a4c7129e
parent 0fe71fefceffb8ad40b1d312e5bf174701422461
Author: Demonstrandum <moi@knutsen.co>
Date:   Sat, 13 Jun 2020 16:58:44 +0100

Use rust nightly

Diffstat:
M.github/workflows/rust.yml | 30++++++++++++++++++++----------
MREADME.md | 2++
Msrc/syntax/lexer.rs | 2+-
3 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml @@ -1,15 +1,25 @@ -name: Rust - on: [push] -jobs: - build: +name: Rust Build Valhallac +jobs: + check: + name: Rust Project runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt, clippy + + # `cargo check` command here will use installed `nightly` + # as it is set as an "override" for current directory + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + diff --git a/README.md b/README.md @@ -48,6 +48,8 @@ and will have its own progress and check-list updates. ### Compile & Run +#### Requires Rust Nightly for now. + In your shell, in the root of this repository, you may write: ```console cargo run [source-file-to-compile.vh] [-o out-file] [-v] diff --git a/src/syntax/lexer.rs b/src/syntax/lexer.rs @@ -93,7 +93,7 @@ pub fn lex(string : &str, filename : &str) -> VecDeque<Token> { let two_chars = partial.get(0..2).unwrap_or("\0\0"); // Consume EON comment: - if two_chars.chars().nth(0).unwrap() == '#' || two_chars == "--" { + if two_chars == "#!" || two_chars == "--" { let old_char_ptr = current_char_ptr; current_char_ptr += if two_chars == "--" { 2 } else { 1 }; loop {