Commit Graph

154 Commits

Author SHA1 Message Date
Lefteris Karapetsas
c6781ed38d Fix some styling issues and remove comments 2015-03-30 17:18:38 +02:00
Lefteris Karapetsas
85bb056993 Abstract contract and inheritance
- Checking the linearized base contracts for abstract functions and
  handle their existence appropriately

- If a contract is abstract it can't be created with new

- An abstract contract is not compiled (no backend code is generated)

- Of course tests
2015-03-27 15:15:34 +01:00
Lefteris Karapetsas
a7e78fadf5 Moving contract fullyImplemented check to TypeRequirements 2015-03-27 11:53:17 +01:00
Lefteris Karapetsas
9d6d7ccab8 Parsing of not fully implemented functions
- Adding the possibility of omitting a function body by simply ending a
  function definition with a semicolon

- Such a function is marked as not fully implemented and any contract
  that contains such a function is considered a not fully implemented contract
2015-03-25 14:26:05 +01:00
Liana Husikyan
ebb4d5e298 - added more tests to check constant specifier implementation
- deny use of const for local variables
- deny unitialized const variables
- only int, fixed strings, and enums can be declaired as const
2015-03-16 10:46:46 +01:00
Liana Husikyan
7d6357ae53 - added isPartOfExternalInterface to Declaration
- changed position for the constant specifier. now it goes after type: <type> <constant> <name> = <value>
- removed tests for constant functions, checkings for constant function doesn't belong to this story
2015-03-16 10:46:46 +01:00
Liana Husikyan
67cd3a7180 added parsing for constant variables 2015-03-16 10:46:46 +01:00
Lefteris Karapetsas
3ca37caddd Fixes after rebasing on top of develop 2015-03-12 12:53:00 +01:00
chriseth
28e88903dc Fix type checks for storage variable initializer. 2015-03-06 13:47:32 +01:00
Christian
b84cf62d6b Index access for calldata arrays. 2015-03-05 13:19:59 +01:00
Liana Husikyan
9b6b2759b4 removed unused member
added some comments for ModifierInvocation::checkTypeRequirements
cleanup
2015-03-02 14:28:13 +01:00
Liana Husikyan
e9238e15b4 Implemented passing arguments to the base constructor. 2015-03-02 14:28:08 +01:00
Lefteris Karapetsas
4f13859f8c Using normal pointer in getInheritableMembers() 2015-03-02 12:08:32 +01:00
Lefteris Karapetsas
bbaa9fef6c getInheritableMembers() does not look at BaseContracts
- Also adding tests for improper accessing members of other contracts.
2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
efe8f9f8a0 Use lambda to avoid code duplication in inheritableMembers 2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
7db2b6fbdb VisibleInDerivedContracts() is now virtual()
- Plus an extra test for internal visibility in a base class variable
2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
47177542f5 Add structs to inheritable members 2015-03-02 11:51:13 +01:00
Lefteris Karapetsas
5e4665b84d Adding inheritable members to a contract 2015-03-02 11:51:13 +01:00
Christian
5d2323c914 Index and length access for dynamic arrays. 2015-02-23 18:28:30 +01:00
Christian
261786d909 Allow conversion to dynamic arrays and update grammar. 2015-02-21 18:25:08 +01:00
Christian
be15e0b424 Index access. 2015-02-21 15:10:02 +01:00
Liana Husikyan
52050201e3 Inline member initialisation
renamed VariableDefinition class to VariableDeclarationStatement
added tests
2015-02-20 22:50:34 +01:00
Lefteris Karapetsas
26132363d5 Bugfix for functions override
- Functions with byte array type parameters can now be safely
  overriden. Parameter location is now set at the right place.

- Also made a test for the fix
2015-02-19 17:43:53 +01:00
Christian
a33fa270f6 Calldata byte arrays stored on the stack. 2015-02-16 19:35:53 +01:00
Christian
f7ba85e0ec No write access to parameters of external functions. 2015-02-16 19:25:24 +01:00
Christian
c944976d00 Some changes to enums. 2015-02-14 13:35:57 +01:00
Lefteris Karapetsas
fbd39323af Moving getMemberValue from EnumDefinition to EnumType 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
b2575b4bcb Addressing issues with Enums in Solidity 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
b20ce4451b Typo in EnumValue 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
fb4ff4af28 implement getType() for EnumValue 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
52808f67fa EnumDeclaration -> EnumValue 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
91943e7368 Enum Value member access should now work properly
- Also detection of duplicate enum values and tests for them have been
  added
2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
012e32942d Enum type conversion and member value access.
- Added tests for the type conversion part.

- Enum member value access still needs some work
2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
c3a9ae0b06 Introducing EnumType and some Parser tests 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
86e1d671cc Parsing an enum AST node 2015-02-13 23:16:14 +01:00
Lefteris Karapetsas
a295417f34 Parsing enums for Solidity - WIP 2015-02-13 23:16:14 +01:00
Christian
1c3c1f1e5d Copying structs. 2015-02-12 20:19:49 +01:00
Christian
20b4c69009 Tests and some code for msg.data. 2015-02-12 11:33:09 +01:00
Christian
cf4144b702 Arbitrary parameters for call() and all hash functions. 2015-02-10 10:59:23 +01:00
chriseth
bb6f181d7d Merge pull request #986 from LefterisJP/sol_StyleFix
Solidity enum style fix
2015-02-10 10:54:28 +01:00
Lefteris Karapetsas
82c5fb3245 Addressing issues in Enum style fix 2015-02-10 09:52:19 +01:00
Lefteris Karapetsas
148a7cb3e1 ExpressionCompiler's enums to CamelCase 2015-02-09 14:35:31 +01:00
Lefteris Karapetsas
3ef75bae6b Camelcasing enums in Types.h 2015-02-09 14:08:48 +01:00
Lefteris Karapetsas
6f621f8486 Changing Solidity Code to use CamelCase enum values 2015-02-09 14:00:12 +01:00
chriseth
d84d9d3ecd Merge pull request #981 from chriseth/sol_cleanup
Small cleanup.
2015-02-09 12:02:17 +01:00
Liana Husikyan
bcccfa8805 - removed unnesessary braces but one in if statement is still there because of warrning about ambiguous "else"
- added marking of position in node factory to the function

Conflicts:
	libsolidity/Parser.cpp
2015-02-09 02:24:57 +01:00
Liana Husikyan
2a5c2578bd - implemented Empty parameter name story. Now the name of input/return parameters of function can be not specified.
- added appropriate tests

Conflicts:
	test/SolidityEndToEndTest.cpp
	test/SolidityNameAndTypeResolution.cpp
2015-02-09 02:06:30 +01:00
Christian
106cda74f8 Small cleanup. 2015-02-09 00:49:35 +01:00
chriseth
a66db516fb Merge pull request #937 from LefterisJP/sol_MultiArgSHA3
Solidity multiple arg sha3
2015-02-09 00:14:13 +01:00
Lefteris Karapetsas
293344b473 SHA3 of string literals now should work 2015-02-06 16:27:41 +01:00