mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 12:17:35 +03:00
Merge pull request #46 from AleoHQ/refactor/syntax-errors
Refactors SyntaxError to leo-ast
This commit is contained in:
commit
c2b5c0acee
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -503,9 +503,11 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"from-pest",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"pest",
|
||||
"pest-ast",
|
||||
"pest_derive",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1,12 +1,14 @@
|
||||
[package]
|
||||
name = "leo-ast"
|
||||
version = "0.1.0"
|
||||
authors = ["howardwu <howardwu@berkeley.edu>"]
|
||||
authors = ["The Aleo Team <hello@aleo.org>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
from-pest = { version = "0.3.1" }
|
||||
lazy_static = { version = "1.3.0" }
|
||||
log = { version = "0.4" }
|
||||
pest = { version = "2.0" }
|
||||
pest-ast = { version = "0.3.3" }
|
||||
pest_derive = { version = "2.0" }
|
||||
thiserror = { version = "1.0" }
|
||||
|
2
ast/src/errors/mod.rs
Normal file
2
ast/src/errors/mod.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub mod syntax;
|
||||
pub use syntax::*;
|
@ -1,4 +1,4 @@
|
||||
use leo_ast::ast::Rule;
|
||||
use crate::ast::Rule;
|
||||
|
||||
use pest::error::Error;
|
||||
|
@ -2,10 +2,11 @@
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate pest_derive;
|
||||
|
||||
extern crate from_pest;
|
||||
extern crate pest;
|
||||
extern crate pest_ast;
|
||||
#[macro_use]
|
||||
extern crate thiserror;
|
||||
|
||||
pub mod ast;
|
||||
pub use ast::*;
|
||||
|
||||
pub mod errors;
|
||||
pub use errors::*;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::errors::{FunctionError, ImportError, IntegerError, SyntaxError};
|
||||
use leo_ast::ast::Rule;
|
||||
use crate::errors::{FunctionError, ImportError, IntegerError, };
|
||||
use leo_ast::{ast::Rule, SyntaxError};
|
||||
|
||||
use pest::error::Error;
|
||||
use std::{io, path::PathBuf};
|
||||
|
@ -1,6 +1,3 @@
|
||||
pub mod ast;
|
||||
pub use self::ast::*;
|
||||
|
||||
pub mod compiler;
|
||||
pub use self::compiler::*;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user