[parser] Remove the input keyword.

This is also not in the current grammar, and it does not look like it is going
to be re-added.
This commit is contained in:
Alessandro Coglio 2022-05-13 23:50:33 -07:00
parent 2fbaf759db
commit 21616fe167
5 changed files with 0 additions and 27 deletions

View File

@ -17,7 +17,6 @@
use super::*;
use leo_errors::{ParserError, Result};
use leo_span::sym;
const INT_TYPES: &[Token] = &[
Token::I8,
@ -317,7 +316,6 @@ impl ParserContext<'_> {
let ident = Identifier { name, span };
Expression::Identifier(ident)
}
Token::Input => Expression::Identifier(Identifier { name: sym::input, span }),
t if crate::type_::TYPE_TOKENS.contains(&t) => Expression::Identifier(Identifier {
name: t.keyword_to_symbol().unwrap(),
span,

View File

@ -420,7 +420,6 @@ impl Token {
"i128" => Token::I128,
"if" => Token::If,
"in" => Token::In,
"input" => Token::Input,
"let" => Token::Let,
"public" => Token::Public,
"return" => Token::Return,

View File

@ -109,9 +109,6 @@ pub enum Token {
Address,
Char,
// primary expresion
Input,
// Regular Keywords
Console,
/// Const variable and a const function.
@ -152,7 +149,6 @@ pub const KEYWORD_TOKENS: &[Token] = &[
Token::I128,
Token::If,
Token::In,
Token::Input,
Token::Let,
Token::Public,
Token::Return,
@ -192,7 +188,6 @@ impl Token {
Token::I128 => sym::i128,
Token::If => sym::If,
Token::In => sym::In,
Token::Input => sym::input,
Token::Let => sym::Let,
Token::Public => sym::Public,
Token::Return => sym::Return,
@ -274,8 +269,6 @@ impl fmt::Display for Token {
Address => write!(f, "address"),
Char => write!(f, "char"),
Input => write!(f, "input"),
Console => write!(f, "console"),
Const => write!(f, "const"),
Constant => write!(f, "constant"),

View File

@ -1,5 +0,0 @@
---
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'ident', got 'input'\n --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^"

View File

@ -1,12 +0,0 @@
/*
namespace: Parse
expectation: Fail
*/
function x(const input) {
return ();
}
function y(constant input) {
return ();
}