-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
232 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
//! Parsers module, for all the parsers implemented by wright and necessary to parse wright source code. | ||
pub mod ast; | ||
pub mod error; | ||
pub mod lexer; | ||
pub mod util; | ||
pub mod state; | ||
pub mod error; | ||
|
||
pub mod util; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
//! Primary expressions in Qright source code. | ||
//! Primary expressions in Qright source code. | ||
use crate::parser::ast::path::Path; | ||
use super::{literal::Literal, parentheses::ParenthesesExpression}; | ||
use crate::parser::ast::path::Path; | ||
|
||
/// A primary expression is a special type of low-level expression that can appear in places where other expressions | ||
/// (such as blocks or conditionals) are not allowed. | ||
/// A primary expression is a special type of low-level expression that can appear in places where other expressions | ||
/// (such as blocks or conditionals) are not allowed. | ||
#[derive(Debug)] | ||
pub enum Primary<'src> { | ||
/// A literal in source code. | ||
Literal(Literal<'src>), | ||
/// A path to an item/symbol/constant value. | ||
/// | ||
/// This includes identifiers as single element paths. | ||
/// A path to an item/symbol/constant value. | ||
/// | ||
/// This includes identifiers as single element paths. | ||
Path(Path<'src>), | ||
/// An expression in parentheses. | ||
Parentheses(ParenthesesExpression<'src>) | ||
/// An expression in parentheses. | ||
Parentheses(ParenthesesExpression<'src>), | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.