feat(solidity): use maintained parser and update highlights accordingly

This commit is contained in:
Amaan Qureshi 2023-02-24 07:42:04 -05:00 committed by Stephan Seitz
parent b401b7423d
commit 5c511dd124
5 changed files with 138 additions and 98 deletions

View file

@ -4,13 +4,13 @@
// ^ comment
pragma solidity >=0.7.0 <0.9.0;
// ^ preproc
// ^ attribute
// ^ preproc
import * as something from "anotherFile";
// ^ ^ ^ include
/// @title Voting with delegation.
// ^ preproc
// <- comment
contract Ballot {
// ^keyword
// ^ type
@ -20,7 +20,7 @@ contract Ballot {
struct Voter {
// ^ type
uint weight; // weight is accumulated by delegation
// ^ type
// ^ type.builtin
// ^ field
bool voted; // if true, that person already voted
address delegate; // person delegated to
@ -34,7 +34,7 @@ contract Ballot {
}
address public chairperson;
// ^ type
// ^ type.builtin
// This declares a state variable that
// stores a `Voter` struct for each possible address.