mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 10:41:57 +03:00
remove escaped double quote for now, address(...) removed
This commit is contained in:
parent
cf36a6bfe7
commit
6e595bd845
@ -1,6 +1,6 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const address_1 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const address_2 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
|
|
||||||
console.assert(address_1 == address_2);
|
console.assert(address_1 == address_2);
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
function main(owner: address) {
|
function main(owner: address) {
|
||||||
const sender = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
|
|
||||||
console.assert(owner == sender);
|
console.assert(owner == sender);
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main(s: bool, c: address) {
|
function main(s: bool, c: address) {
|
||||||
const a = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const a = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const b = address(aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r);
|
const b = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;
|
||||||
|
|
||||||
const r = s? a: b;
|
const r = s? a: b;
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const public_key_string = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const address_1 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const address_2 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9);
|
const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9;
|
||||||
|
|
||||||
console.assert(address_1 == address_2);
|
console.assert(address_1 == address_2);
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const address_1 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const address_2 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
|
|
||||||
console.assert(address_1 == address_2);
|
console.assert(address_1 == address_2);
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
function main(owner: address) {
|
function main(owner: address) {
|
||||||
const sender = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
|
|
||||||
console.assert(owner == sender);
|
console.assert(owner == sender);
|
||||||
}
|
}
|
@ -1,3 +1,3 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const public_key_string = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j88);
|
const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j88;
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main(s: bool, c: address) {
|
function main(s: bool, c: address) {
|
||||||
const a = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const a = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const b = address(aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r);
|
const b = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;
|
||||||
|
|
||||||
const r = s? a: b;
|
const r = s? a: b;
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const public_key_string = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
}
|
}
|
@ -446,12 +446,6 @@ identifier = letter *( letter / digit / "_" ) ; but not a keyword
|
|||||||
package-name = 1*( lowercase-letter / digit )
|
package-name = 1*( lowercase-letter / digit )
|
||||||
*( "-" 1*( lowercase-letter / digit ) )
|
*( "-" 1*( lowercase-letter / digit ) )
|
||||||
|
|
||||||
; An address starts with 'aleo1'
|
|
||||||
; and continues with exactly 58 lowercase letters and digits.
|
|
||||||
; Thus an address always consists of 63 characters.
|
|
||||||
|
|
||||||
address = %s"aleo1" 58( lowercase-letter / digit )
|
|
||||||
|
|
||||||
; A format string is a sequence of characters, other than double quote,
|
; A format string is a sequence of characters, other than double quote,
|
||||||
; surrounded by double quotes.
|
; surrounded by double quotes.
|
||||||
; Within a format string, sub-strings '{}' are distinguished as containers
|
; Within a format string, sub-strings '{}' are distinguished as containers
|
||||||
@ -466,9 +460,9 @@ address = %s"aleo1" 58( lowercase-letter / digit )
|
|||||||
|
|
||||||
format-string-container = "{}"
|
format-string-container = "{}"
|
||||||
|
|
||||||
not-double-quote-or-open-brace = %x0-22 / %x24-7A / %x7C-10FFFF / %x5c%x22
|
not-double-quote-or-open-brace = %x0-22 / %x24-7A / %x7C-10FFFF
|
||||||
|
|
||||||
not-double-quote-or-close-brace = %x0-22 / %x24-7C / %x7E-10FFFF / %x5c%x22
|
not-double-quote-or-close-brace = %x0-22 / %x24-7C / %x7E-10FFFF
|
||||||
|
|
||||||
format-string-element = not-double-quote-or-open-brace
|
format-string-element = not-double-quote-or-open-brace
|
||||||
/ "{" not-double-quote-or-close-brace
|
/ "{" not-double-quote-or-close-brace
|
||||||
@ -536,10 +530,11 @@ product-group-literal = integer %s"group"
|
|||||||
|
|
||||||
boolean-literal = %s"true" / %s"false"
|
boolean-literal = %s"true" / %s"false"
|
||||||
|
|
||||||
; An address literal is an address wrapped into an indication of address,
|
; An address literal starts with 'aleo1'
|
||||||
; to differentiate it from an identifier.
|
; and continues with exactly 58 lowercase letters and digits.
|
||||||
|
; Thus an address always consists of 63 characters.
|
||||||
|
|
||||||
address-literal = %s"address" "(" address ")"
|
address-literal = %s"aleo1" 58( lowercase-letter / digit )
|
||||||
|
|
||||||
; The ones above are all the atomic literals
|
; The ones above are all the atomic literals
|
||||||
; (in the sense that they are tokens, without whitespace allowed in them),
|
; (in the sense that they are tokens, without whitespace allowed in them),
|
||||||
|
@ -689,22 +689,6 @@ impl ParserContext {
|
|||||||
Token::True => Expression::Value(ValueExpression::Boolean("true".into(), span)),
|
Token::True => Expression::Value(ValueExpression::Boolean("true".into(), span)),
|
||||||
Token::False => Expression::Value(ValueExpression::Boolean("false".into(), span)),
|
Token::False => Expression::Value(ValueExpression::Boolean("false".into(), span)),
|
||||||
Token::AddressLit(value) => Expression::Value(ValueExpression::Address(value, span)),
|
Token::AddressLit(value) => Expression::Value(ValueExpression::Address(value, span)),
|
||||||
Token::Address => {
|
|
||||||
self.expect(Token::LeftParen)?;
|
|
||||||
let value = self.expect_any()?;
|
|
||||||
let value = if let SpannedToken {
|
|
||||||
token: Token::AddressLit(value),
|
|
||||||
..
|
|
||||||
} = value
|
|
||||||
{
|
|
||||||
value
|
|
||||||
} else {
|
|
||||||
return Err(SyntaxError::unexpected_str(&value.token, "address", &value.span));
|
|
||||||
};
|
|
||||||
|
|
||||||
let end = self.expect(Token::RightParen)?;
|
|
||||||
Expression::Value(ValueExpression::Address(value, span + end))
|
|
||||||
}
|
|
||||||
Token::LeftParen => self.parse_tuple_expression(&span)?,
|
Token::LeftParen => self.parse_tuple_expression(&span)?,
|
||||||
Token::LeftSquare => self.parse_array_expression(&span)?,
|
Token::LeftSquare => self.parse_array_expression(&span)?,
|
||||||
Token::Ident(name) => {
|
Token::Ident(name) => {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const public_key_string = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j88);
|
const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j88;
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const address_1 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const address_2 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9);
|
const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9;
|
||||||
|
|
||||||
console.assert(address_1 == address_2);
|
console.assert(address_1 == address_2);
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const address_1 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_1 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const address_2 = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const address_2 = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
|
|
||||||
console.assert(address_1 == address_2);
|
console.assert(address_1 == address_2);
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
function main(owner: address) {
|
function main(owner: address) {
|
||||||
const sender = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const sender = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
|
|
||||||
console.assert(owner == sender);
|
console.assert(owner == sender);
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
function main(s: bool, c: address) {
|
function main(s: bool, c: address) {
|
||||||
const a = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const a = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
const b = address(aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r);
|
const b = aleo18qgam03qe483tdrcc3fkqwpp38ehff4a2xma6lu7hams6lfpgcpq3dq05r;
|
||||||
|
|
||||||
const r = s? a: b;
|
const r = s? a: b;
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function main() {
|
function main() {
|
||||||
const public_key_string = address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8);
|
const public_key_string = aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8;
|
||||||
}
|
}
|
@ -7,8 +7,3 @@ aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
|||||||
aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9
|
aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9
|
||||||
aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9
|
aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9
|
||||||
aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st
|
aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st
|
||||||
|
|
||||||
address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8)
|
|
||||||
address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9)
|
|
||||||
address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9)
|
|
||||||
address(aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st)
|
|
||||||
|
@ -37,40 +37,4 @@ outputs:
|
|||||||
col_start: 1
|
col_start: 1
|
||||||
col_stop: 64
|
col_stop: 64
|
||||||
path: address_parse.leo
|
path: address_parse.leo
|
||||||
content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st
|
content: aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st
|
||||||
- Value:
|
|
||||||
Address:
|
|
||||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8
|
|
||||||
- line_start: 1
|
|
||||||
line_stop: 1
|
|
||||||
col_start: 1
|
|
||||||
col_stop: 73
|
|
||||||
path: address_parse.leo
|
|
||||||
content: address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j8)
|
|
||||||
- Value:
|
|
||||||
Address:
|
|
||||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9
|
|
||||||
- line_start: 1
|
|
||||||
line_stop: 1
|
|
||||||
col_start: 1
|
|
||||||
col_stop: 73
|
|
||||||
path: address_parse.leo
|
|
||||||
content: address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57j9)
|
|
||||||
- Value:
|
|
||||||
Address:
|
|
||||||
- aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9
|
|
||||||
- line_start: 1
|
|
||||||
line_stop: 1
|
|
||||||
col_start: 1
|
|
||||||
col_stop: 73
|
|
||||||
path: address_parse.leo
|
|
||||||
content: address(aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d9)
|
|
||||||
- Value:
|
|
||||||
Address:
|
|
||||||
- aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st
|
|
||||||
- line_start: 1
|
|
||||||
line_stop: 1
|
|
||||||
col_start: 1
|
|
||||||
col_stop: 73
|
|
||||||
path: address_parse.leo
|
|
||||||
content: address(aleo1aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st)
|
|
Loading…
Reference in New Issue
Block a user