Last change
on this file since 270 was 270, checked in by coas-nagasima, 7 years ago |
mruby版ECNLプロトタイピング・ツールを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/x-csharp
|
File size:
713 bytes
|
Rev | Line | |
---|
[270] | 1 | // Porting from
|
---|
| 2 | // https://github.com/jeanlazarou/blockly2ruby
|
---|
| 3 | // Copyright (c) 2014 Jean Lazarou
|
---|
| 4 | // MIT Lisence
|
---|
| 5 | using System;
|
---|
| 6 | using Bridge;
|
---|
| 7 | using System.Collections.Generic;
|
---|
| 8 |
|
---|
| 9 | namespace WebMrbc
|
---|
| 10 | {
|
---|
| 11 | partial class Ruby
|
---|
| 12 | {
|
---|
| 13 | public node variables_get(VariablesGetBlock block)
|
---|
| 14 | {
|
---|
| 15 | // Variable getter.
|
---|
| 16 | var code = get_var_name(block.getFieldValue("VAR"));
|
---|
| 17 | return new_var_node(code);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | public node variables_set(VariablesSetBlock block)
|
---|
| 21 | {
|
---|
| 22 | // Variable setter.
|
---|
| 23 | var argument0 = valueToCode(block, "VALUE");
|
---|
| 24 | if (argument0 == null) argument0 = new int_node(this, 0);
|
---|
| 25 | var varName = get_var_name(block.getFieldValue("VAR"));
|
---|
| 26 | return new asgn_node(this, new_var_node(varName), argument0);
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.