@@ -7,8 +7,8 @@ use std::io::Write;
77use std:: process:: Command ;
88extern crate pbr;
99extern crate serde_json;
10- use std:: collections:: HashMap ;
1110use clap:: * ;
11+ use std:: collections:: HashMap ;
1212
1313use git2:: Repository ;
1414use pbr:: ProgressBar ;
@@ -25,45 +25,59 @@ fn main() {
2525 let matches = App :: new ( "Nyson" )
2626 . version ( "0.19" )
2727 . about ( "a programing language made in rust" )
28- . arg ( Arg :: with_name ( "INPUT" )
29- . help ( "the file to run" )
30- . required ( false )
31- . index ( 1 ) )
32- . arg ( Arg :: with_name ( "dev" )
33- . short ( "d" )
34- . long ( "dev" )
35- . help ( "Gives you dev debug tools" )
36- . takes_value ( false ) )
37- . arg ( Arg :: with_name ( "compile" )
38- . short ( "c" )
39- . long ( "compile" )
40- . help ( "Compiles your program" )
41- . takes_value ( false ) )
42- . arg ( Arg :: with_name ( "hard" )
43- . short ( "h" )
44- . long ( "hard" )
45- . help ( "compiles the language to offline mode" )
46- . takes_value ( false ) )
47- . arg ( Arg :: with_name ( "run" )
48- . short ( "r" )
49- . long ( "run" )
50- . help ( "Runs the program" )
51- . takes_value ( false ) )
52- . arg ( Arg :: with_name ( "install" )
53- . short ( "i" )
54- . long ( "install" )
55- . help ( "installs all the dependencies" )
56- . takes_value ( false ) )
57- . arg ( Arg :: with_name ( "init" )
58- . long ( "init" )
59- . help ( "makes a new project" )
60- . takes_value ( false ) )
28+ . arg (
29+ Arg :: with_name ( "INPUT" )
30+ . help ( "the file to run" )
31+ . required ( false )
32+ . index ( 1 ) ,
33+ )
34+ . arg (
35+ Arg :: with_name ( "dev" )
36+ . short ( "d" )
37+ . long ( "dev" )
38+ . help ( "Gives you dev debug tools" )
39+ . takes_value ( false ) ,
40+ )
41+ . arg (
42+ Arg :: with_name ( "compile" )
43+ . short ( "c" )
44+ . long ( "compile" )
45+ . help ( "Compiles your program" )
46+ . takes_value ( false ) ,
47+ )
48+ . arg (
49+ Arg :: with_name ( "hard" )
50+ . short ( "h" )
51+ . long ( "hard" )
52+ . help ( "compiles the language to offline mode" )
53+ . takes_value ( false ) ,
54+ )
55+ . arg (
56+ Arg :: with_name ( "run" )
57+ . short ( "r" )
58+ . long ( "run" )
59+ . help ( "Runs the program" )
60+ . takes_value ( false ) ,
61+ )
62+ . arg (
63+ Arg :: with_name ( "install" )
64+ . short ( "i" )
65+ . long ( "install" )
66+ . help ( "installs all the dependencies" )
67+ . takes_value ( false ) ,
68+ )
69+ . arg (
70+ Arg :: with_name ( "init" )
71+ . long ( "init" )
72+ . help ( "makes a new project" )
73+ . takes_value ( false ) ,
74+ )
6175 . get_matches ( ) ;
6276 let mut compile = matches. is_present ( "compile" ) ;
6377 let mut hard = matches. is_present ( "hard" ) ;
6478 let mut run = matches. is_present ( "run" ) ;
6579 let mut dev = matches. is_present ( "dev" ) ;
66- let mut file: String = String :: new ( ) ;
80+ let mut file: String = String :: new ( ) ;
6781 if matches. is_present ( "INPUT" ) || run {
6882 file = matches. value_of ( "INPUT" ) . unwrap ( ) . to_string ( ) ;
6983 } else {
0 commit comments