pomeryt / Infanino

A programming language that has immune system.
MIT License
0 stars 1 forks source link

Add validation logic to check empty lines. #7

Closed pomeryt closed 6 years ago

pomeryt commented 6 years ago

Motivation

We believe more than one consecutive empty lines are unnecessary.

Example

Assume (n) indicates the line number, and it's not actually the part of code.

The following code is valid:

(1) one
(2) two
(3) three
(4) 
(5) four
(6) 
(7) five

The following code is invalid:

(1) one
(2)
(3) two
(4) 
(5) 
(6) three
(7) four
(8) five

The line (5) is invalid because the previous line (4) is empty line.