Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Added support for Solidity.#464

Open
ComandanteCheth wants to merge 1 commit intogooglearchive:masterfrom
ComandanteCheth:master
Open

Added support for Solidity.#464
ComandanteCheth wants to merge 1 commit intogooglearchive:masterfrom
ComandanteCheth:master

Conversation

@ComandanteCheth
Copy link
Copy Markdown

Solidity is the main language for contracts on the Ethereum platform. Support is desired by the community on ethereum.stackexchange.com.

@googlebot
Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@ComandanteCheth
Copy link
Copy Markdown
Author

I tried to create a Google account to accept the CLA, but apparently this requires a phone number (which I prefer to not share with you). Instead, I would like to accept the CLA with this comment, in the form as linked above, for all my contributions related to this pull request (past, present, and future). I sincerely hope that googlebot will be the only one unsatisfied with this solution.

Comment thread src/lang-solidity.js
}
}
fixedSizes = fixedSizes.slice(0, -1);
var keywords = 'abstract|anonymous|as|assembly|break|case|catch|constant' +
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few more here, e.g., addmod, sha3, etc.

Actually, after a quick diff with this lexer, it appears the following keywords are missing:

addmod
after
assert
block
ecrecover
event
false
keccak256
msg
mulmod
now
null
revert
ripemd160
selfdestruct
sha256
sha3
suicide
super
this
true
tx

Comment thread src/lang-solidity.js
// literals
[PR['PR_LITERAL'], new RegExp('^(?:0x[a-fA-F0-9_]+|\\d+)(\\s+(?:' + units + '))?')], // decimal or hex number with optional unit
[PR['PR_LITERAL'], /^"(?:[^"\\\r\n]|\\.)*"|^'(?:[^'\\\r\n]|\\.)*'/], // string
[PR['PR_LITERAL'], /^hex(?:"(?:[a-fA-F0-9_]{2})*"|'(?:[a-fA-F0-9_]{2})*')/], // hex
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this one. Is it supposed to be /^hex( or /^0x(?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

@ligi ligi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ComandanteCheth I have a signed the needed CLA already once and could resubmit this PR for you if you want. Context: https://www.reddit.com/r/ethereum/comments/6bgc9x/need_a_googlecodeprettify_lexer_for_solidity/

Comment thread src/lang-solidity.js
// literals
[PR['PR_LITERAL'], new RegExp('^(?:0x[a-fA-F0-9_]+|\\d+)(\\s+(?:' + units + '))?')], // decimal or hex number with optional unit
[PR['PR_LITERAL'], /^"(?:[^"\\\r\n]|\\.)*"|^'(?:[^'\\\r\n]|\\.)*'/], // string
[PR['PR_LITERAL'], /^hex(?:"(?:[a-fA-F0-9_]{2})*"|'(?:[a-fA-F0-9_]{2})*')/], // hex
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghost
Copy link
Copy Markdown

ghost commented Jun 23, 2017

@ligi not sure whether @ComandanteCheth will reply. Can you resubmit anyways since you signed already?

@ligi
Copy link
Copy Markdown

ligi commented Jun 23, 2017

Unfortunately I can't - not technically - but legally - I would need the consent of @ComandanteCheth - otherwise I cannot just resubmit without violating law AFAIK. I would have to rewrite it - and I don't really want to touch JS - also not sure how to do it differently than in this PR. Kind of a sad situation ..

@5chdn
Copy link
Copy Markdown

5chdn commented Jun 26, 2017

@ligi the APLv2 should be fine as long as you retain the copyright message set by @ComandanteCheth

@gapar2 the only legally unclear issue is the CLA, can we bypass that by resubmitting the PR?

https://opensource.stackexchange.com/questions/5661/can-i-resubmit-someone-elses-pull-request-if-he-does-not-sign-cla/5662#5662 (check the last paragraph of the answer).

@5chdn
Copy link
Copy Markdown

5chdn commented Nov 29, 2017

@ComandanteCheth is lost in space :(

@Solexplorer
Copy link
Copy Markdown

@ComandanteCheth Are you still alive ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants