Skip to content

Commit

Permalink
Remove parser components related input files
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Jan 15, 2024
1 parent ce39d9a commit a38c407
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 130 deletions.
3 changes: 0 additions & 3 deletions compiler/parser/src/parser/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ pub(crate) struct ParserContext<'a> {
pub(crate) prev_token: SpannedToken,
/// true if parsing an expression for if and loop statements -- means struct inits are not legal
pub(crate) disallow_struct_construction: bool,
/// true if parsing an identifier inside an input file.
pub(crate) allow_identifier_underscores: bool,
}

/// Dummy span used to appease borrow checker.
Expand All @@ -59,7 +57,6 @@ impl<'a> ParserContext<'a> {
handler,
node_builder,
disallow_struct_construction: false,
allow_identifier_underscores: false,
prev_token: token.clone(),
token,
tokens,
Expand Down
13 changes: 2 additions & 11 deletions compiler/parser/src/parser/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use super::*;
use leo_errors::{ParserError, Result};

use leo_span::{sym, Symbol};
use leo_span::sym;
use snarkvm::console::{account::Address, network::Testnet3};

const INT_TYPES: &[Token] = &[
Expand Down Expand Up @@ -623,16 +623,7 @@ impl ParserContext<'_> {
}

fn parse_struct_member(&mut self) -> Result<StructVariableInitializer> {
let identifier = if self.allow_identifier_underscores && self.eat(&Token::Underscore) {
// Allow `_nonce` for struct records.
let identifier_without_underscore = self.expect_identifier()?;
Identifier::new(
Symbol::intern(&format!("_{}", identifier_without_underscore.name)),
self.node_builder.next_id(),
)
} else {
self.expect_identifier()?
};
let identifier = self.expect_identifier()?;

let (expression, span) = if self.eat(&Token::Colon) {
// Parse individual struct variable declarations.
Expand Down
58 changes: 0 additions & 58 deletions errors/src/errors/input/input_errors.rs

This file was deleted.

19 changes: 0 additions & 19 deletions errors/src/errors/input/mod.rs

This file was deleted.

39 changes: 0 additions & 39 deletions examples/auction/inputs/auction.in

This file was deleted.

0 comments on commit a38c407

Please sign in to comment.