From f09abd7ab31c9f7f6d945c478085ef830101de3a Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 4 Feb 2022 13:31:33 +0800 Subject: [PATCH] Fix builds. --- src/ast/ast.rs | 2 +- src/engine.rs | 5 ++--- src/parser.rs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ast/ast.rs b/src/ast/ast.rs index 6fb96e85..7077bad6 100644 --- a/src/ast/ast.rs +++ b/src/ast/ast.rs @@ -73,7 +73,7 @@ impl AST { ) -> Self { Self { source: Identifier::new_const(), - body: StmtBlock::new(statements, Position::NONE), + body: StmtBlock::new(statements, Position::NONE, Position::NONE), #[cfg(not(feature = "no_function"))] lib: functions.into(), #[cfg(not(feature = "no_module"))] diff --git a/src/engine.rs b/src/engine.rs index aa5a36d1..a08e13f4 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -4,10 +4,9 @@ use crate::api::custom_syntax::CustomSyntax; use crate::func::native::{OnDebugCallback, OnParseTokenCallback, OnPrintCallback, OnVarCallback}; use crate::packages::{Package, StandardPackage}; use crate::tokenizer::Token; -use crate::types::dynamic::{ Union}; +use crate::types::dynamic::Union; use crate::{ - Dynamic, Identifier, ImmutableString, Module, Position, RhaiResult, Shared, - StaticVec, + Dynamic, Identifier, ImmutableString, Module, Position, RhaiResult, Shared, StaticVec, }; #[cfg(feature = "no_std")] use std::prelude::v1::*; diff --git a/src/parser.rs b/src/parser.rs index 85046218..ae8de862 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -16,7 +16,7 @@ use crate::types::dynamic::AccessMode; use crate::types::StringsInterner; use crate::{ calc_fn_hash, Dynamic, Engine, ExclusiveRange, Identifier, ImmutableString, InclusiveRange, - LexError, ParseError, Position, Scope, Shared, StaticVec, Variant, AST, INT, PERR, + LexError, ParseError, Position, Scope, Shared, StaticVec, AST, INT, PERR, }; #[cfg(feature = "no_std")] use std::prelude::v1::*;