Browse Source

Fix strings in array

github-actions v0.0.2
Garrit Franke 2 years ago
parent
commit
06588aa272
  1. 2
      build_docs.py
  2. 3
      src/parser/rules.rs
  3. 1
      src/parser/tests.rs

2
build_docs.py

@ -1,7 +1,7 @@
import subprocess
import os
os.system("mdbook build --dest-dir './book")
os.system("mdbook build --dest-dir './book'")
os.system("mdbook build --dest-dir './book/latest'")
tags = subprocess.run(["git", "tag"], stdout=subprocess.PIPE).stdout.decode('utf-8')

3
src/parser/rules.rs

@ -201,6 +201,9 @@ impl Parser {
let value = next.raw.parse::<u32>().map_err(|e| e.to_string())?;
elements.push(Expression::Int(value));
}
TokenKind::Literal(Value::Str) => {
elements.push(Expression::Str(next.raw));
}
_ => return Err(self.make_error(TokenKind::Identifier("Argument".into()), next)),
};
if self.peek_token(TokenKind::SquareBraceClose).is_ok() {

1
src/parser/tests.rs

@ -366,7 +366,6 @@ fn test_int_array() {
}
#[test]
#[ignore]
fn test_string_array() {
let raw = "
fn main(n) {

Loading…
Cancel
Save