add source command

This commit is contained in:
Tanishq Kancharla 2021-10-01 22:25:35 -04:00
parent e1a0ad2987
commit 8ef16c6da6

View File

@ -1,5 +1,6 @@
use crate::{ use crate::{
lex, lite_parse, lex, lite_parse,
parse_keywords::parse_source,
type_check::{math_result_type, type_compatible}, type_check::{math_result_type, type_compatible},
LiteBlock, ParseError, Token, TokenContents, LiteBlock, ParseError, Token, TokenContents,
}; };
@ -2585,7 +2586,7 @@ pub fn parse_statement(
b"alias" => parse_alias(working_set, spans), b"alias" => parse_alias(working_set, spans),
b"module" => parse_module(working_set, spans), b"module" => parse_module(working_set, spans),
b"use" => parse_use(working_set, spans), b"use" => parse_use(working_set, spans),
b"source" => parse_use(working_set, spans), b"source" => parse_source(working_set, spans),
_ => { _ => {
let (expr, err) = parse_expression(working_set, spans); let (expr, err) = parse_expression(working_set, spans);
(Statement::Pipeline(Pipeline::from_vec(vec![expr])), err) (Statement::Pipeline(Pipeline::from_vec(vec![expr])), err)