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 @@ -1610,8 +1610,18 @@ AssemblyAssignment
1610
1610
}
1611
1611
}
1612
1612
1613
+ ReturnOpCode
1614
+ = 'return' {
1615
+ return {
1616
+ type: " Identifier" ,
1617
+ name: " return" ,
1618
+ start: location ().start .offset ,
1619
+ end: location ().end .offset
1620
+ }
1621
+ }
1622
+
1613
1623
FunctionalAssemblyInstruction
1614
- = name :Identifier __ '(' __ head :AssemblyItem ? __ tail :( ',' __ AssemblyItem )* __ ')' {
1624
+ = name :( Identifier / ReturnOpCode ) __ '(' __ head :AssemblyItem ? __ tail :( ',' __ AssemblyItem )* __ ')' {
1615
1625
return {
1616
1626
type: " FunctionalAssemblyInstruction" ,
1617
1627
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