mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-20 03:27:14 +03:00
fix typos
This commit is contained in:
parent
46d539a0b6
commit
31b4868ed0
@ -84,7 +84,7 @@ impl SourceMap {
|
|||||||
Some(LineCol { source_file, line, col })
|
Some(LineCol { source_file, line, col })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Retrives the location (source file, line, col) on the given span.
|
/// Retrieves the location (source file, line, col) on the given span.
|
||||||
pub fn span_to_location(&self, sp: Span) -> Option<SpanLocation> {
|
pub fn span_to_location(&self, sp: Span) -> Option<SpanLocation> {
|
||||||
let lo = self.find_line_col(sp.lo)?;
|
let lo = self.find_line_col(sp.lo)?;
|
||||||
let hi = self.find_line_col(sp.hi)?;
|
let hi = self.find_line_col(sp.hi)?;
|
||||||
|
@ -27,7 +27,7 @@ use serde::{
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
/// The AST contains a few tuple-like enum variants that contain spans.
|
/// The AST contains a few tuple-like enum variants that contain spans.
|
||||||
/// #[derive(Serialize, Deserialize)] outputs these fields as anonmyous
|
/// #[derive(Serialize, Deserialize)] outputs these fields as anonymous
|
||||||
/// mappings, which makes them difficult to remove from the JSON AST.
|
/// mappings, which makes them difficult to remove from the JSON AST.
|
||||||
/// This function provides a custom serialization that maps the keyword
|
/// This function provides a custom serialization that maps the keyword
|
||||||
/// `span` to the span information.
|
/// `span` to the span information.
|
||||||
|
@ -46,7 +46,7 @@ pub struct Backtraced {
|
|||||||
pub error: bool,
|
pub error: bool,
|
||||||
#[derivative(PartialEq = "ignore")]
|
#[derivative(PartialEq = "ignore")]
|
||||||
#[derivative(Hash = "ignore")]
|
#[derivative(Hash = "ignore")]
|
||||||
/// The backtrace representing where the error occured in Leo.
|
/// The backtrace representing where the error occurred in Leo.
|
||||||
pub backtrace: Backtrace,
|
pub backtrace: Backtrace,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,10 +31,10 @@ pub use self::macros::*;
|
|||||||
pub mod traits;
|
pub mod traits;
|
||||||
pub use self::traits::*;
|
pub use self::traits::*;
|
||||||
|
|
||||||
// Right now for cleanliness of calling error functions we say each argument implments one of the follow types rather than giving a specific type.
|
// Right now for cleanliness of calling error functions we say each argument implements one of the follow types rather than giving a specific type.
|
||||||
// This allows us to just pass many types rather doing conversions cleaning up the code.
|
// This allows us to just pass many types rather doing conversions cleaning up the code.
|
||||||
// The args can be made cleaneronce https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable.
|
// The args can be made cleaneronce https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable.
|
||||||
// Either of why would allows to generate a type alias for these trait implmenting types.
|
// Either of why would allows to generate a type alias for these trait implementing types.
|
||||||
// pub(crate) type DisplayArg = impl std::fmt::Display;
|
// pub(crate) type DisplayArg = impl std::fmt::Display;
|
||||||
// pub(crate) type DebugArg = impl std::fmt::Debug;
|
// pub(crate) type DebugArg = impl std::fmt::Debug;
|
||||||
// pub(crate) type ErrorArg = impl std::error::Error;
|
// pub(crate) type ErrorArg = impl std::error::Error;
|
||||||
|
@ -195,7 +195,7 @@ create_messages!(
|
|||||||
help: None,
|
help: None,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// For when the package failed to initalize.
|
/// For when the package failed to initialize.
|
||||||
@backtraced
|
@backtraced
|
||||||
failed_to_initialize_package {
|
failed_to_initialize_package {
|
||||||
args: (package: impl Display, path: impl Debug),
|
args: (package: impl Display, path: impl Debug),
|
||||||
|
@ -28,5 +28,5 @@ the low 16 bits are zero and counts zero otherwise. Then `b3` uses a mask `y &
|
|||||||
otherwise. The masks for `b2`, `b1`, and `b0` can count four, two, and
|
otherwise. The masks for `b2`, `b1`, and `b0` can count four, two, and
|
||||||
one 0-bits similarly.
|
one 0-bits similarly.
|
||||||
|
|
||||||
The varables `bz, b4, .., b0` are all independent, and their values are added up
|
The variables `bz, b4, .., b0` are all independent, and their values are added up
|
||||||
for the result.
|
for the result.
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i128 {
|
transition main(y: bool) -> i128 {
|
||||||
let a: i128 = -170141183460469231731687303715884105727i128;
|
let a: i128 = -170141183460469231731687303715884105727i128;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i128 {
|
transition main(y: bool) -> i128 {
|
||||||
let a: i128 = -170141183460469231731687303715884105728i128;
|
let a: i128 = -170141183460469231731687303715884105728i128;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i16 {
|
transition main(y: bool) -> i16 {
|
||||||
let a: i16 = -32767i16;
|
let a: i16 = -32767i16;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i16 {
|
transition main(y: bool) -> i16 {
|
||||||
let a: i16 = -32768i16;
|
let a: i16 = -32768i16;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i32 {
|
transition main(y: bool) -> i32 {
|
||||||
let a: i32 = -2147483647i32;
|
let a: i32 = -2147483647i32;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i32 {
|
transition main(y: bool) -> i32 {
|
||||||
let a: i32 = -2147483648i32;
|
let a: i32 = -2147483648i32;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i64 {
|
transition main(y: bool) -> i64 {
|
||||||
let a: i64 = -9223372036854775807i64;
|
let a: i64 = -9223372036854775807i64;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i64 {
|
transition main(y: bool) -> i64 {
|
||||||
let a: i64 = -9223372036854775808i64;
|
let a: i64 = -9223372036854775808i64;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i8 {
|
transition main(y: bool) -> i8 {
|
||||||
let a: i8 = -127i8;
|
let a: i8 = -127i8;
|
||||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
program test.aleo {
|
program test.aleo {
|
||||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||||
|
|
||||||
transition main(y: bool) -> i8 {
|
transition main(y: bool) -> i8 {
|
||||||
let a: i8 = -128i8;
|
let a: i8 = -128i8;
|
||||||
|
Loading…
Reference in New Issue
Block a user