Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support floating points literals of the form "123." and "13.".
  • Loading branch information
pmurias committed Jun 21, 2016
1 parent 5b005a2 commit c555b37
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Snake/Grammar.nqp
Expand Up @@ -148,8 +148,12 @@ token integer {
}

### 2.4.5: Floating point literals
# Currently handled with HLL::Grammar's built-in <dec_number>. I think it even
# covers the same cases as Python wants.

token dec_number {
| $<coeff>=[ '.' \d+ ] <escale>?
| $<coeff>=[ \d+ '.' \d* ] <escale>?
| $<coeff>=[ \d+ ] <escale>
}

### 2.4.6: Imaginary literals
# TODO
Expand Down

0 comments on commit c555b37

Please sign in to comment.