• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

abs-lang / abs / 1522
76%
master: 63%

Build:
Build:
LAST BUILD BRANCH: 2.8.x
DEFAULT BRANCH: master
Ran 28 Jul 2020 02:24PM UTC
Jobs 3
Files 9
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jul 2020 02:23PM UTC coverage: 75.721% (-0.01%) from 75.732%
1522

push

travis-ci-com

odino
Parsing negative numbers a-la ruby, closes #383 and #382

This bugfix introduces negative numbers into our parser:
before, -10 would be parsed as (minus, number) whereas
right now it's going to be parsed as (number) only.

This fixes a bug with precedences, where `-1.str()`
would be parsed as (-, (1, str)), leading to first
calling the str method on the positive number, then
applying the minus.

Before:

```
⧐  -1.234.str()
ERROR: unknown operator: -STRING
	[1:1]	-1.234.str()

```

After:

```
⧐  -1.234.str()
-1.234
```

If a space is found between the minus and the number,
the old parsing mechanism still applies.

I found inspiration in Ruby, where:

```
$ - 1.to_s()
-@: undefined method `-@' for "1":String

$-1.to_s()
-1

$ -10.3.floor()
-11

$ - 10.3.floor()
-10
```

7 of 7 new or added lines in 1 file covered. (100.0%)

3624 of 4786 relevant lines covered (75.72%)

258.21 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
evaluator/evaluator.go
Jobs
ID Job ID Ran Files Coverage
1 1522.1 (GO111MODULE=on CONTEXT=abs) 28 Jul 2020 02:25PM UTC 0
74.78
Travis Job 1522.1
2 1522.2 (GO111MODULE=on CONTEXT=abs) 28 Jul 2020 02:24PM UTC 0
75.68
Travis Job 1522.2
3 1522.3 (GO111MODULE=on CONTEXT=abs) 28 Jul 2020 02:27PM UTC 0
75.68
Travis Job 1522.3
Source Files on build 1522
  • Tree
  • List 9
  • Changed 9
  • Source Changed 9
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Build #1522
  • 80a14952 on github
  • Prev Build on 2.2.x (#1521)
  • Next Build on 2.2.x (#1524)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc