rename leo-inputs -> leo-input

This commit is contained in:
collin 2020-07-31 18:49:01 -07:00
parent ce2a92b9bf
commit e22e962588
89 changed files with 46 additions and 46 deletions

8
Cargo.lock generated
View File

@ -560,7 +560,7 @@ dependencies = [
"from-pest",
"leo-compiler",
"leo-gadgets",
"leo-inputs",
"leo-input",
"log",
"rand",
"rand_core",
@ -602,7 +602,7 @@ dependencies = [
"hex",
"leo-ast",
"leo-gadgets",
"leo-inputs",
"leo-input",
"leo-types",
"log",
"num-bigint",
@ -634,7 +634,7 @@ dependencies = [
]
[[package]]
name = "leo-inputs"
name = "leo-input"
version = "0.1.0"
dependencies = [
"from-pest",
@ -654,7 +654,7 @@ name = "leo-types"
version = "0.1.0"
dependencies = [
"leo-ast",
"leo-inputs",
"leo-input",
"pest",
"serde",
"snarkos-errors",

View File

@ -13,12 +13,12 @@ name = "leo"
path = "leo/main.rs"
[workspace]
members = [ "ast", "compiler", "gadgets", "leo-inputs", "types" ]
members = [ "ast", "compiler", "gadgets", "leo-input", "types" ]
[dependencies]
leo-compiler = { path = "compiler", version = "0.1.0" }
leo-gadgets = { path = "gadgets", version = "0.1.0" }
leo-inputs = { path = "leo-inputs", version = "0.1.0" }
leo-input = { path = "leo-input", version = "0.1.0" }
snarkos-algorithms = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-algorithms", default-features = false }
snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-curves", default-features = false }

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
leo-ast = { path = "../ast", version = "0.1.0" }
leo-gadgets = { path = "../gadgets", version = "0.1.0" }
leo-inputs = { path = "../leo-inputs", version = "0.1.0" }
leo-input = { path = "../leo-input", version = "0.1.0" }
leo-types = { path = "../types", version = "0.1.0" }
snarkos-curves = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-curves", default-features = false }

View File

@ -9,7 +9,7 @@ use crate::{
OutputsFile,
};
use leo_ast::LeoParser;
use leo_inputs::LeoInputsParser;
use leo_input::LeoInputsParser;
use leo_types::{Inputs, MainInputs, Program};
use snarkos_errors::gadgets::SynthesisError;

View File

@ -1,6 +1,6 @@
use crate::errors::{FunctionError, ImportError, OutputBytesError, OutputsFileError};
use leo_ast::ParserError;
use leo_inputs::InputParserError;
use leo_input::InputParserError;
use bincode::Error as SerdeError;
use std::path::PathBuf;

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{I128Type, IntegerType};
use leo_input::types::{I128Type, IntegerType};
use leo_types::InputValue;
test_int!(Testi128, i128, IntegerType::I128Type(I128Type {}), Int128);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{I16Type, IntegerType};
use leo_input::types::{I16Type, IntegerType};
use leo_types::InputValue;
test_int!(Testi16, i16, IntegerType::I16Type(I16Type {}), Int16);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{I32Type, IntegerType};
use leo_input::types::{I32Type, IntegerType};
use leo_types::InputValue;
test_int!(Testi32, i32, IntegerType::I32Type(I32Type {}), Int32);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{I64Type, IntegerType};
use leo_input::types::{I64Type, IntegerType};
use leo_types::InputValue;
test_int!(Testi64, i64, IntegerType::I64Type(I64Type {}), Int64);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{I8Type, IntegerType};
use leo_input::types::{I8Type, IntegerType};
use leo_types::InputValue;
test_int!(Testi8, i8, IntegerType::I8Type(I8Type {}), Int8);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{IntegerType, U128Type};
use leo_input::types::{IntegerType, U128Type};
use leo_types::InputValue;
test_uint!(TestU128, u128, IntegerType::U128Type(U128Type {}), UInt128);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{IntegerType, U16Type};
use leo_input::types::{IntegerType, U16Type};
use leo_types::InputValue;
test_uint!(TestU16, u16, IntegerType::U16Type(U16Type {}), UInt16);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{IntegerType, U32Type};
use leo_input::types::{IntegerType, U32Type};
use leo_types::InputValue;
test_uint!(TestU32, u32, IntegerType::U32Type(U32Type {}), UInt32);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{IntegerType, U64Type};
use leo_input::types::{IntegerType, U64Type};
use leo_types::InputValue;
test_uint!(TestU64, u64, IntegerType::U64Type(U64Type {}), UInt64);

View File

@ -5,7 +5,7 @@ use crate::{
integers::{expect_parsing_error, IntegerTester},
parse_program,
};
use leo_inputs::types::{IntegerType, U8Type};
use leo_input::types::{IntegerType, U8Type};
use leo_types::InputValue;
test_uint!(TestU8, u8, IntegerType::U8Type(U8Type {}), UInt8);

View File

@ -7,7 +7,7 @@ use crate::{
parse_program_with_inputs,
EdwardsTestCompiler,
};
use leo_inputs::types::{IntegerType, U32Type};
use leo_input::types::{IntegerType, U32Type};
use leo_types::InputValue;
#[test]

View File

@ -1,7 +1,7 @@
use crate::{expect_compiler_error, parse_inputs, parse_program};
use leo_ast::ParserError;
use leo_compiler::errors::{CompilerError, ExpressionError, FunctionError, StatementError};
use leo_inputs::InputParserError;
use leo_input::InputParserError;
#[test]
fn test_semicolon() {

View File

@ -1,5 +1,5 @@
[package]
name = "leo-inputs"
name = "leo-input"
version = "0.1.0"
authors = ["The Aleo Team <hello@aleo.org>"]
edition = "2018"

View File

@ -1,8 +1,8 @@
//! Abstract syntax tree (ast) representation from leo-inputs.pest.
//! Abstract syntax tree (ast) representation from leo-input.pest.
use pest::{error::Error, iterators::Pairs, Parser, Span};
#[derive(Parser)]
#[grammar = "leo-inputs.pest"]
#[grammar = "leo-input.pest"]
pub struct LanguageParser;
pub fn parse(input: &str) -> Result<Pairs<Rule>, Error<Rule>> {

View File

@ -30,7 +30,7 @@ impl LeoInputsParser {
/// Parses the input file and constructs a syntax tree.
pub fn parse_file(input_file: &str) -> Result<files::File, InputParserError> {
// Parse the file using leo-inputs.pest
// Parse the file using leo-input.pest
let mut file = ast::parse(input_file)?;
// Build the abstract syntax tree

View File

@ -206,10 +206,10 @@ impl From<leo_compiler::errors::CompilerError> for CLIError {
}
}
impl From<leo_inputs::errors::InputParserError> for CLIError {
fn from(error: leo_inputs::errors::InputParserError) -> Self {
impl From<leo_input::errors::InputParserError> for CLIError {
fn from(error: leo_input::errors::InputParserError) -> Self {
log::error!("{}\n", error);
CLIError::Crate("leo_inputs", "Program failed due to previous error".into())
CLIError::Crate("leo_input", "Program failed due to previous error".into())
}
}

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies]
leo-ast = { path = "../ast", version = "0.1.0" }
leo-inputs = { path = "../leo-inputs", version = "0.1.0" }
leo-input = { path = "../leo-input", version = "0.1.0" }
snarkos-errors = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-errors", default-features = false }
snarkos-models = { git = "ssh://git@github.com/AleoHQ/snarkOS.git", package = "snarkos-models", default-features = false }

View File

@ -1,6 +1,6 @@
use crate::Span;
use leo_ast::common::Identifier as AstIdentifier;
use leo_inputs::common::Identifier as InputsAstIdentifier;
use leo_input::common::Identifier as InputsAstIdentifier;
use serde::{Deserialize, Serialize};
use std::fmt;

View File

@ -17,7 +17,7 @@ use leo_ast::{
};
use leo_ast::values::AddressValue;
use leo_inputs::values::NumberValue;
use leo_input::values::NumberValue;
use serde::{Deserialize, Serialize};
use std::fmt;

View File

@ -1,11 +1,11 @@
use leo_inputs::{
use leo_input::{
errors::InputParserError,
expressions::{ArrayInitializerExpression, ArrayInlineExpression, Expression},
types::{ArrayType, DataType, IntegerType, Type},
values::{BooleanValue, FieldValue, GroupValue, NumberImplicitValue, NumberValue, Value},
};
use leo_inputs::values::Address;
use leo_input::values::Address;
use std::fmt;
#[derive(Clone, PartialEq, Eq)]

View File

@ -1,5 +1,5 @@
use crate::{InputValue, MainInputs, ProgramInputs, ProgramState, Record, Registers, State, StateLeaf};
use leo_inputs::{
use leo_input::{
files::{File, TableOrSection},
InputParserError,
};

View File

@ -1,5 +1,5 @@
use crate::{Identifier, Span, Type};
use leo_inputs::parameters::Parameter as AstParameter;
use leo_input::parameters::Parameter as AstParameter;
#[derive(Clone, PartialEq, Eq, Hash)]
pub struct Parameter {

View File

@ -1,5 +1,5 @@
use crate::InputValue;
use leo_inputs::{definitions::Definition, InputParserError};
use leo_input::{definitions::Definition, InputParserError};
use std::collections::HashMap;
#[derive(Clone, PartialEq, Eq)]

View File

@ -1,5 +1,5 @@
use crate::{InputValue, MainInputs, Registers};
use leo_inputs::{
use leo_input::{
sections::{Header, Section},
InputParserError,
};

View File

@ -1,5 +1,5 @@
use crate::{InputValue, Parameter};
use leo_inputs::{definitions::Definition, InputParserError};
use leo_input::{definitions::Definition, InputParserError};
use std::collections::HashMap;

View File

@ -1,5 +1,5 @@
use crate::{Record, StateLeaf};
use leo_inputs::{
use leo_input::{
sections::{Header, Section},
InputParserError,
};

View File

@ -1,5 +1,5 @@
use crate::{InputValue, Parameter};
use leo_inputs::{definitions::Definition, InputParserError};
use leo_input::{definitions::Definition, InputParserError};
use std::collections::HashMap;

View File

@ -1,5 +1,5 @@
use crate::{InputValue, Parameter};
use leo_inputs::{definitions::Definition, InputParserError};
use leo_input::{definitions::Definition, InputParserError};
use std::collections::HashMap;

View File

@ -1,5 +1,5 @@
use crate::{PrivateState, PublicState, Record, State, StateLeaf};
use leo_inputs::{
use leo_input::{
tables::{Table, Visibility},
InputParserError,
};

View File

@ -1,5 +1,5 @@
use crate::State;
use leo_inputs::{
use leo_input::{
sections::{Header, Section},
InputParserError,
};

View File

@ -1,5 +1,5 @@
use crate::{InputValue, Parameter};
use leo_inputs::{definitions::Definition, InputParserError};
use leo_input::{definitions::Definition, InputParserError};
use std::collections::HashMap;

View File

@ -1,5 +1,5 @@
use leo_ast::types::IntegerType as AstIntegerType;
use leo_inputs::types::IntegerType as InputsAstIntegerType;
use leo_input::types::IntegerType as InputsAstIntegerType;
use serde::{Deserialize, Serialize};
use std::fmt;

View File

@ -1,6 +1,6 @@
use crate::{Expression, Identifier, IntegerType};
use leo_ast::types::{ArrayType, CircuitType, DataType, Type as AstType};
use leo_inputs::types::{ArrayType as InputsArrayType, DataType as InputsDataType, Type as InputsAstType};
use leo_input::types::{ArrayType as InputsArrayType, DataType as InputsDataType, Type as InputsAstType};
use serde::{Deserialize, Serialize};
use std::fmt;