question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Commented snippet causes compile to fail

See original GitHub issue

truffle compile succeeds or fails with SyntaxError: Expected "{", "}", any character, comment, end of line or whitespace but end of input found. depending on whether a couple functions are commented out in my contract.

Might be related to #194

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tcoultercommented, Aug 24, 2016

Fixed on master. Will go out with the next release. Thanks everyone for the report!

0reactions
chatchcommented, Aug 24, 2016

ok actually it does happen calling solidity-parser directly if parsing ‘imports’ as per truffle/lib/profiler.js:137:

var imports = SolidityParser.parse(body, “imports”);

I’ve created an issue here https://github.com/ConsenSys/solidity-parser/issues/7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do comments affect the compile???
The 2nd snippet that will compile is more visible to see the error as the colours show up where as in the first...
Read more >
java - Code inside of a comment is causing compile failure
The problem is that the string \u is interpreted by Eclipse as the prefix of a unicode character, while here it is just...
Read more >
Is commented out code really always bad? [duplicate]
I think the "commented out code is a bad thing" really refers to dead code that people just didn't want to delete for...
Read more >
Unable to compile code snippets with `KotlinScriptEngine ...
Running all tests with snippet compilation fails with a compiler exception. ... File being compiled: (2,35) in /Line_18.kts The root cause ...
Read more >
XCode 14 compile errors immediatel… - Apple Developer
I'm unable to use XCode 14 to develop my app because as soon as a compiler error is shown, it is immediately withdrawn...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found