Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Fixed variable arithmetic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnabRollin committed Oct 15, 2023
1 parent d0b0fa8 commit 6647959
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 7 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,22 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Get homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- name: Install linux linker
run: brew install SergioBenitez/osxct/x86_64-unknown-linux-gnu
- name: Build
run: cargo build --verbose
run: |
rustup target add x86_64-unknown-linux-gnu
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc \
cargo build --verbose
- name: Run tests
run: cargo test --verbose
run: |
rustup target add x86_64-unknown-linux-gnu
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc \
cargo test --verbose
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.1] - 2023-10-14

### Fixed

- Bug where variables can't be used with operators

## [0.6.0] - 2023-10-14

### Added
Expand Down Expand Up @@ -71,7 +77,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Simple function and string parsing

[unreleased]: https://github.com/ArnabRollin/dwn/compare/v0.6.0...HEAD
[unreleased]: https://github.com/ArnabRollin/dwn/compare/v0.6.1...HEAD

[0.6.1]: https://github.com/ArnabRollin/dwn/compare/v0.6.0...v0.6.1

[0.6.0]: https://github.com/ArnabRollin/dwn/compare/v0.5.0...v0.6.0

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dwn"
version = "0.6.0"
version = "0.6.1"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pub fn tokenize(data: String, meta: &mut Metadata) -> Vec<Token> {
if !in_literal && !in_string {
tokens.push(Token {
ty: TokenTypes::VARIABLE,
modifiers: if in_func {
modifiers: if in_func || in_operator {
vec![TokenModifiers::ARGS]
} else {
vec![]
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() {
if arguments.options.contains(&"version".to_string())
|| arguments.flags.contains(&"v".to_string())
{
println!("0.6.0");
println!("0.6.1");
exit(0);
}

Expand Down

0 comments on commit 6647959

Please sign in to comment.