Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only .ved file extension are allowed. #27

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cli/src/utilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ pub fn help() {
Vedic v{}

Vedic is a programming language that is designed to be easy to learn and use.

Developed by: Pt. Prashant Tripathi

Usage: vedic [--option] [path/to/script.ved]

Options:
-h, --help Show this vedic cli help message
-v, --version Print version number
-r, --repl Run the vedic repl
Examples:

Examples:
➤ to run a vedic script
vedic script.ved

➤ to start the vedic repl
vedic -r
",
Expand Down Expand Up @@ -60,7 +60,7 @@ pub fn run(args: Vec<String>) {
}

pub fn run_file(path: &str) {
if path.ends_with(".ved") {
if path.ends_with(".ved") || path.ends_with(".veda") || path.ends_with(".vedic") {
let mut aadhaar = Aadhaar::new();
aadhaar.prarambha();
let sc = match Sourcecode::new(path) {
Expand All @@ -78,7 +78,7 @@ pub fn run_file(path: &str) {
}
}
} else {
eprintln!("Invalid file extension. Only .ved files are allowed.");
eprintln!("Invalid file extension. Only .ved / .veda / .vedic extension are allowed.");
process::exit(0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/mulya.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl fmt::Display for Mulya {
write!(
f,
"{}",
if *mulya.deref() {
PtPrashantTripathi marked this conversation as resolved.
Show resolved Hide resolved
if *mulya {
"सत्य"
} else {
"असत्य"
Expand Down