File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1617,8 +1617,18 @@ AssemblyAssignment
1617
1617
}
1618
1618
}
1619
1619
1620
+ ReturnOpCode
1621
+ = 'return' {
1622
+ return {
1623
+ type: " Identifier" ,
1624
+ name: " return" ,
1625
+ start: location ().start .offset ,
1626
+ end: location ().end .offset
1627
+ }
1628
+ }
1629
+
1620
1630
FunctionalAssemblyInstruction
1621
- = name :Identifier __ '(' __ head :AssemblyItem ? __ tail :( ',' __ AssemblyItem )* __ ')' {
1631
+ = name :( Identifier / ReturnOpCode ) __ '(' __ head :AssemblyItem ? __ tail :( ',' __ AssemblyItem )* __ ')' {
1622
1632
return {
1623
1633
type: " FunctionalAssemblyInstruction" ,
1624
1634
name: name,
Original file line number Diff line number Diff line change @@ -312,6 +312,19 @@ contract assemblyLocalBinding {
312
312
}
313
313
}
314
314
315
+ contract assemblyReturn {
316
+ uint a = 10 ;
317
+
318
+ function get () constant returns (uint ) {
319
+ assembly {
320
+ mstore (0x40 , sload (0 ))
321
+ byte (0 )
322
+ address (0 )
323
+ return (0x40 ,32 )
324
+ }
325
+ }
326
+ }
327
+
315
328
contract usesConst {
316
329
uint const = 0 ;
317
330
}
You can’t perform that action at this time.
0 commit comments