Back to working state

This commit is contained in:
JT
2021-09-03 06:21:37 +12:00
parent e1be8f61fc
commit 94687a7603
28 changed files with 170 additions and 116 deletions

View File

@ -1,4 +1,4 @@
use nu_protocol::{Span, StateWorkingSet, Type};
use nu_protocol::{engine::StateWorkingSet, Span, Type};
use std::ops::Range;
#[derive(Debug)]

View File

@ -1,5 +1,5 @@
use nu_protocol::Span;
use nu_protocol::{Block, Expr, Expression, Pipeline, StateWorkingSet, Statement};
use nu_protocol::ast::{Block, Expr, Expression, Pipeline, Statement};
use nu_protocol::{engine::StateWorkingSet, Span};
#[derive(Debug)]
pub enum FlatShape {

View File

@ -6,7 +6,7 @@ mod parser;
mod type_check;
pub use errors::ParseError;
pub use flatten::FlatShape;
pub use flatten::{flatten_block, FlatShape};
pub use lex::{lex, Token, TokenContents};
pub use lite_parse::{lite_parse, LiteBlock};
pub use parser::{Import, VarDecl};
pub use parser::{parse_file, parse_source, Import, VarDecl};

View File

@ -5,8 +5,9 @@ use crate::{
};
use nu_protocol::{
span, Block, BlockId, Call, DeclId, Expr, Expression, Flag, Operator, Pipeline, PositionalArg,
Signature, Span, StateWorkingSet, Statement, SyntaxShape, Type, VarId,
ast::{Block, Call, Expr, Expression, Operator, Pipeline, Statement},
engine::StateWorkingSet,
span, BlockId, DeclId, Flag, PositionalArg, Signature, Span, SyntaxShape, Type, VarId,
};
#[derive(Debug, Clone)]

View File

@ -1,5 +1,9 @@
use crate::ParseError;
use nu_protocol::{Expr, Expression, Operator, StateWorkingSet, Type};
use nu_protocol::{
ast::{Expr, Expression, Operator},
engine::StateWorkingSet,
Type,
};
pub fn type_compatible(lhs: &Type, rhs: &Type) -> bool {
match (lhs, rhs) {