Skip to content

Commit 7b8b56e

Browse files
committed
Changing the read function declaration
1 parent 604d698 commit 7b8b56e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

EBNF.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ literal = integer
6565
| string
6666
| boolean ;
6767

68-
read_expression = "read" "(" type ")" ;
68+
read_expression = "read" "()" ;
6969
capture_command = "!" "(" command_text ")" ;
7070

7171
type = "int" | "string" | "bool" | "void" ;

analysis/parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ expression_list:
206206
;
207207

208208
read_expression:
209-
READ LPAREN type RPAREN
209+
READ LPAREN RPAREN
210210
;
211211

212212
type:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
let username: string = read(string);
1+
let username: string = read();
22
echo("Hi, " + username);

0 commit comments

Comments
 (0)