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

mvdan / sh / 872
78%

Build:
DEFAULT BRANCH: master
Ran 03 Sep 2017 06:44PM UTC
Jobs 2
Files 19
Run time 3s
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

pending completion
872

push

travis-ci

mvdan
syntax: use newline tokens everywhere

This is necessary to support parsing a statement in a single line
without tokenizing the start of the next one. In other words, this is
required for an interactive shell.

We also need to stop reading past a newline token. Otherwise we're back
at the original problem - we need to read one rune past a newline so
that the lexer finishes its next() call.

Finally, once we've seen a newline token, ignore all following newlines
with any whitespace in between. This helps limit the overhead added by
the extra tokens when they're not needed.

name                   old time/op    new time/op    delta
Parse/LongStrs-4         5.35µs ± 1%    5.36µs ± 1%    ~     (p=0.723 n=6+6)
Parse/Cmds+Nested-4      7.44µs ± 3%    7.47µs ± 1%    ~     (p=0.394 n=6+6)
Parse/Vars+Clauses-4     6.19µs ± 1%    6.23µs ± 1%    ~     (p=0.485 n=6+6)
Parse/Binary+Redirs-4    6.96µs ± 1%    7.10µs ± 1%  +2.00%  (p=0.002 n=6+6)

Also add a test that checks that reading just a newline is enough for
Stmts to call back with a statement. The test was failing before this
change, since it needed another token to follow, such as a literal.

Updates #156.

5486 of 5766 relevant lines covered (95.14%)

1948.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 872.1 03 Sep 2017 06:44PM UTC 0
95.14
Travis Job 872.1
2 872.2 03 Sep 2017 06:44PM UTC 0
95.14
Travis Job 872.2
Source Files on build 872
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #872
  • 59f2f296 on github
  • Prev Build on master (#871)
  • Next Build on master (#873)
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

© 2026 Coveralls, Inc