Skip to content

Commit bc104d8

Browse files
authored
Added new extension
fix: only `.ved` file extension are allowed. (#27) * fix: only .ved file is allowed Signed-off-by: Kunal Singh <[email protected]> * fix: unnecessory remove .deref() on bool --------- Signed-off-by: Kunal Singh <[email protected]>
1 parent 810df98 commit bc104d8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

cli/src/utilities.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ pub fn help() {
1313
Vedic v{}
1414
1515
Vedic is a programming language that is designed to be easy to learn and use.
16-
16+
1717
Developed by: Pt. Prashant Tripathi
18-
18+
1919
Usage: vedic [--option] [path/to/script.ved]
20-
20+
2121
Options:
2222
-h, --help Show this vedic cli help message
2323
-v, --version Print version number
2424
-r, --repl Run the vedic repl
25-
26-
Examples:
25+
26+
Examples:
2727
➤ to run a vedic script
2828
vedic script.ved
29-
29+
3030
➤ to start the vedic repl
3131
vedic -r
3232
",
@@ -60,7 +60,7 @@ pub fn run(args: Vec<String>) {
6060
}
6161

6262
pub fn run_file(path: &str) {
63-
if path.ends_with(".ved") {
63+
if path.ends_with(".ved") || path.ends_with(".veda") || path.ends_with(".vedic") {
6464
let mut aadhaar = Aadhaar::new();
6565
aadhaar.prarambha();
6666
let sc = match Sourcecode::new(path) {
@@ -78,7 +78,7 @@ pub fn run_file(path: &str) {
7878
}
7979
}
8080
} else {
81-
eprintln!("Invalid file extension. Only .ved files are allowed.");
81+
eprintln!("Invalid file extension. Only .ved / .veda / .vedic extension are allowed.");
8282
process::exit(0);
8383
}
8484
}

core/src/mulya.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl fmt::Display for Mulya {
6464
write!(
6565
f,
6666
"{}",
67-
if *mulya.deref() {
67+
if *mulya {
6868
"सत्य"
6969
} else {
7070
"असत्य"

0 commit comments

Comments
 (0)