Skip to content

Commit

Permalink
Merge branch 'Spu7Nix:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
feverdreme authored Aug 1, 2021
2 parents 70056f6 + 3a6da29 commit 45585f1
Show file tree
Hide file tree
Showing 16 changed files with 430 additions and 283 deletions.
84 changes: 84 additions & 0 deletions spwn-lang/Cargo.lock

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

2 changes: 2 additions & 0 deletions spwn-lang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ smallvec = "1.4.2"
text_io = "0.1.8"
regex = "1.5.4"

internment = "0.5.4"

ariadne = "0.1.3" # errors

aes = "0.6.0"
Expand Down
6 changes: 3 additions & 3 deletions spwn-lang/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ pub enum ValueBody {
}

impl ValueBody {
pub fn to_variable(&self) -> Variable {
pub fn to_variable(&self, pos: FileRange) -> Variable {
Variable {
value: ValueLiteral { body: self.clone() },
operator: None,
pos: (0, 0),
pos,
//comment: (None, None),
path: Vec::new(),
tag: Attribute::new(),
Expand Down Expand Up @@ -354,7 +354,7 @@ impl Expression {
Variable {
operator: None,
value: ValueLiteral::new(ValueBody::Expression(self.clone())),
pos: (0, 0),
pos: self.get_pos(),
path: Vec::new(),
//comment: (None, None),
tag: Attribute::new(),
Expand Down
4 changes: 2 additions & 2 deletions spwn-lang/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ macro_rules! typed_argument_check {
#[allow(unused_variables)]
#[allow(unused_mut)]
#[allow(unused_parens)]
let ( $($arg_name),*) = clone_and_get_value($arguments[$arg_index], $globals.get_lifetime($arguments[$arg_index]), $globals, $context.start_group, true, $info.position.clone());
let ( $($arg_name),*) = clone_and_get_value($arguments[$arg_index], $globals.get_lifetime($arguments[$arg_index]), $globals, $context.start_group, true);
};

(($globals:ident, $arg_index:ident, $arguments:ident, $info:ident, $context:ident) mut ($($arg_name:ident),*)) => {
Expand All @@ -304,7 +304,7 @@ macro_rules! typed_argument_check {
#[allow(unused_mut)]
#[allow(unused_parens)]

let ( $($arg_name),*) = match clone_and_get_value($arguments[$arg_index], $globals.get_lifetime($arguments[$arg_index]), $globals, $context.start_group, true, $info.position.clone()) {
let ( $($arg_name),*) = match clone_and_get_value($arguments[$arg_index], $globals.get_lifetime($arguments[$arg_index]), $globals, $context.start_group, true) {
Value::$arg_type($($arg_name),*) => ($($arg_name),*),

a => {
Expand Down
Loading

0 comments on commit 45585f1

Please sign in to comment.