{ "name": "Vyper", "scopeName": "source.vyper", "patterns": [ { "name": "comment", "match": "\\#.*" }, { "name": "comment", "begin": "(\\\"\\\"\\\")", "end": "(\\\"\\\"\\\")" }, { "name": "keyword.control", "match": "\\b(event|enum)\\s+([A-Za-z_]\\w*)\\b", "captures": { "2": { "name": "support.function" } } }, { "name": "keyword.control", "match": "\\b(contract|interface|library|using|struct|constructor|modifier)(\\s+[A-Za-z_]\\w*)?(?:\\s+is\\s+((?:[A-Za-z_][\\,\\s]*)*))?\\b", "captures": { "2": { "name": "entity.name.function" }, "3": { "name": "entity.name.function" } } }, { "name": "storage.type.function", "match": "\\b(def)(\\s+[A-Za-z_]\\w*)?(?:\\s+is\\s+((?:[A-Za-z_][\\,\\s]*)*))?\\b", "captures": { "2": { "name": "entity.name.function" }, "3": { "name": "entity.name.function" } } }, { "match": "\\b(address\\s*payable|address|string|bytes?\\d*|int\\d*|uint\\d*|bool|u?fixed\\d+x\\d+)\\s*(?:\\[(\\d*)\\])?\\s*(?:\\[(\\d*)\\])?\\s*(?:(indexed|memory|storage|calldata|payable)?\\s*(\\b[A-Za-z_]\\w*)\\s*)?(?=[,\\)])", "captures": { "1": { "name": "constant.language" }, "2": { "name": "constant.numeric" }, "3": { "name": "constant.numeric" }, "4": { "name": "keyword.control" }, "5": { "name": "variable.parameter" } } }, { "match": "\\b(mapping)\\s*\\((.*)\\s+=\u003e\\s+(.*)\\)(\\s+(?:private|public|internal|external))?\\s+([A-Za-z_]\\w*)\\b", "captures": { "1": { "name": "constant.language" }, "2": { "name": "constant.language" }, "3": { "name": "constant.language" }, "4": { "name": "keyword.control" } } }, { "name": "constant.language", "match": "\\b(True|False)\\b" }, { "name": "storage.type.function", "match": "\\b(self)\\.\\b" }, { "match": "\\b(address\\s*payable|address|string|bytes?\\d*|int\\d*|uint\\d*|bool|u?fixed\\d+x\\d+)\\b", "captures": { "1": { "name": "constant.language" }, "2": { "name": "constant.numeric" }, "3": { "name": "constant.numeric" }, "4": { "name": "keyword.control" } } }, { "name": "keyword.control", "match": "\\b(var|import|constant|pragma|payable|storage|memory|calldata|if|else|for|while|do|break|continue|returns?|private|public|pure|view|internal|external|this|suicide|selfdestruct|delegatecall|emit|new|is|throw|revert|assert|require|\\_)\\b" }, { "name": "keyword", "match": "\\b(not|or|pass|not|from|import)\\b" }, { "name": "keyword", "match": "(@[A-Za-z_]\\w*)\\b" }, { "match": "\\b([A-Za-z_]\\w*)\\s*\\:\\s*", "captures": { "1": { "name": "variable.parameter" } } }, { "name": "keyword.control", "match": "(=|!|\u003e|\u003c|\\||\u0026|\\?|:|\\^|~|\\*|\\+|\\-|\\/|\\%|\\bhex\\b)" }, { "match": "\\b(msg|block|tx|abi)\\.([A-Za-z_]\\w*)\\b", "captures": { "1": { "name": "constant.language" }, "2": { "name": "constant.language" } } }, { "match": "\\b(now|delete)\\b", "captures": { "1": { "name": "constant.language" } } }, { "match": "\\b(blockhash|gasleft|addmod|mulmod|keccak256|sha256|sha3|ripemd160|ecrecover)\\s*\\(", "captures": { "1": { "name": "constant.language" } } }, { "match": "\\b([A-Za-z_]\\w*)(?:\\[(\\d*)\\])?(?:\\[(\\d*)\\])?\\(", "captures": { "1": { "name": "support.function" }, "2": { "name": "constant.numeric" }, "3": { "name": "constant.numeric" } } }, { "match": "\\b\\.(length|selector)\\b", "captures": { "1": { "name": "support.type" } } }, { "match": "\\b(\\d+)\\s+(wei|finney|szabo|ether|seconds|minutes|hours|days|weeks|years)\\b", "captures": { "1": { "name": "constant.numeric" }, "2": { "name": "keyword.control" } } }, { "name": "string.quoted", "match": "([\\\"\\'].*?[\\\"\\'])" }, { "match": "\\b(\\d+)(e\\d*)?\\b", "captures": { "1": { "name": "constant.numeric" }, "2": { "name": "constant.numeric" } } }, { "name": "constant.numeric", "match": "\\b(0[xX][a-fA-F0-9]+)\\b" } ] }