Changeset 425 for EcnlProtoTool/trunk
- Timestamp:
- May 29, 2020, 10:45:52 PM (4 years ago)
- Location:
- EcnlProtoTool/trunk/webapp
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/webapp/webmrbc.sln
r270 r425 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 12.00 3 # Visual Studio 144 VisualStudioVersion = 1 4.0.25420.13 # Visual Studio Version 16 4 VisualStudioVersion = 16.0.29102.190 5 5 MinimumVisualStudioVersion = 10.0.40219.1 6 6 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "webmrbc", "webmrbc\webmrbc.csproj", "{7E71D3E4-F61A-4423-994A-EB307D7618E0}" … … 20 20 HideSolutionNode = FALSE 21 21 EndGlobalSection 22 GlobalSection(ExtensibilityGlobals) = postSolution 23 SolutionGuid = {537ABA34-4886-472B-81D4-8ECE70055369} 24 EndGlobalSection 22 25 EndGlobal -
EcnlProtoTool/trunk/webapp/webmrbc/App.cs
r321 r425 174 174 } 175 175 if ((item.classGroupCode == 0xE) && (cls.classCode == 0xF0)) { 176 cls.properties = (JsonPropertyInfo[])profProps.Concat(properties);176 cls.properties = profProps.Concat(properties).ToArray(); 177 177 NodeProfileClass = cls; 178 178 } … … 344 344 public class Collections 345 345 { 346 [ Name(false)]346 [Convention(Notation.PascalCase)] 347 347 internal static ENodeWorkspace LocalNode; 348 [ Name(false)]348 [Convention(Notation.PascalCase)] 349 349 internal static Collection<IClassWorkspace> ClassWorkspaces; 350 [ Name(false)]350 [Convention(Notation.PascalCase)] 351 351 internal static EcnlTaskWorkspace EcnlTaskWorkspace; 352 [ Name(false)]352 [Convention(Notation.PascalCase)] 353 353 internal static MainLoopWorkspace MainLoopWorkspace; 354 354 } … … 356 356 public class Views 357 357 { 358 [ Name(false)]358 [Convention(Notation.PascalCase)] 359 359 internal static MainMenuView MainMenuView; 360 [ Name(false)]360 [Convention(Notation.PascalCase)] 361 361 internal static ClassSelectorView ClassSelectorView; 362 [ Name(false)]362 [Convention(Notation.PascalCase)] 363 363 internal static EObjectModalView EObjectModalView; 364 364 } … … 408 408 byte b = bytes[i + index]; 409 409 if (b < 0x20) 410 sb += "\x1B[1;3;31m" + String .FromCharCode(b + 0x40) + "\x1B[0m";410 sb += "\x1B[1;3;31m" + StringPrototype.FromCharCode(b + 0x40) + "\x1B[0m"; 411 411 else 412 sb += String .FromCharCode(b);412 sb += StringPrototype.FromCharCode(b); 413 413 } 414 414 } -
EcnlProtoTool/trunk/webapp/webmrbc/Arduino/KernelBlock.cs
r321 r425 38 38 using System.Collections.Generic; 39 39 using System.Linq; 40 using Bridge. Text.RegularExpressions;40 using Bridge.Html5; 41 41 42 42 namespace WebMrbc … … 451 451 public string validator(string text) 452 452 { 453 text = text.Replace(new Reg ex("[^0-9a-fA-F]+", "g"), "");453 text = text.Replace(new RegExp("[^0-9a-fA-F]+", "g"), ""); 454 454 return text; 455 455 } -
EcnlProtoTool/trunk/webapp/webmrbc/Block.cs
r321 r425 46 46 public string type; 47 47 48 [External, Field Property]48 [External, Field] 49 49 public string id { get; set; } 50 [External, Field Property]50 [External, Field] 51 51 public Connection outputConnection { get; set; } 52 [External, Field Property]52 [External, Field] 53 53 public Connection nextConnection { get; set; } 54 [External, Field Property]54 [External, Field] 55 55 public Connection previousConnection { get; set; } 56 [External, Field Property]56 [External, Field] 57 57 public Input[] inputList { get; set; } 58 [External, Field Property]58 [External, Field] 59 59 public bool inputsInline { get; set; } 60 [External, Field Property]60 [External, Field] 61 61 public bool disabled { get; set; } 62 [External, Field Property]62 [External, Field] 63 63 public string tooltip { get; set; } 64 [External, Field Property]64 [External, Field] 65 65 public bool contextMenu { get; set; } 66 [External, Field Property]66 [External, Field] 67 67 public string contextMenuMsg_ { get; set; } 68 [External, Field Property]68 [External, Field] 69 69 public Union<string, Comment> comment { get; set; } 70 [External, Field Property]70 [External, Field] 71 71 public bool RTL { get; set; } 72 [External, Field Property]72 [External, Field] 73 73 public Block[] prevBlocks_ { get; set; } 74 [External, Field Property]74 [External, Field] 75 75 public Workspace workspace { get; set; } 76 [External, Field Property]76 [External, Field] 77 77 public Mutator mutator { get; set; } 78 [External, Field Property]78 [External, Field] 79 79 public bool isInFlyout { get; } 80 80 -
EcnlProtoTool/trunk/webapp/webmrbc/Blockly.cs
r321 r425 32 32 public partial class Blockly 33 33 { 34 [ Name(false)]34 [Convention(Notation.PascalCase)] 35 35 public static Xml Xml; 36 [ Name(false)]36 [Convention(Notation.PascalCase)] 37 37 public static Events Events; 38 [ Name(false)]38 [Convention(Notation.PascalCase)] 39 39 public static Procedures Procedures; 40 [ Name(false)]40 [Convention(Notation.PascalCase)] 41 41 public static Variables Variables; 42 [ Name(false)]42 [Convention(Notation.PascalCase)] 43 43 public static Names Names; 44 44 … … 46 46 /// Number of pixels the mouse must move before a drag starts. 47 47 /// </summary> 48 [ Name(false)]48 [Convention(Notation.PascalCase)] 49 49 public static int DRAG_RADIUS = 5; 50 50 … … 52 52 /// Maximum misalignment between connections for them to snap together. 53 53 /// </summary> 54 [ Name(false)]54 [Convention(Notation.PascalCase)] 55 55 public static int SNAP_RADIUS = 20; 56 56 … … 58 58 /// Delay in ms between trigger and bumping unconnected block out of alignment. 59 59 /// </summary> 60 [ Name(false)]60 [Convention(Notation.PascalCase)] 61 61 public static int BUMP_DELAY = 250; 62 62 … … 64 64 /// Number of characters to truncate a collapsed block to. 65 65 /// </summary> 66 [ Name(false)]66 [Convention(Notation.PascalCase)] 67 67 public static int COLLAPSE_CHARS = 30; 68 68 … … 70 70 /// Length in ms for a touch to become a long press. 71 71 /// </summary> 72 [ Name(false)]72 [Convention(Notation.PascalCase)] 73 73 public static int LONGPRESS = 750; 74 74 … … 77 77 /// miliseconds. 78 78 /// </summary> 79 [ Name(false)]79 [Convention(Notation.PascalCase)] 80 80 public static int SOUND_LIMIT = 100; 81 81 … … 84 84 /// Must be in the range of 0 (inclusive) to 1 (exclusive). 85 85 /// </summary> 86 [ Name(false)]86 [Convention(Notation.PascalCase)] 87 87 public static double HSV_SATURATION = 0.45; 88 88 … … 91 91 /// Must be in the range of 0 (inclusive) to 1 (exclusive). 92 92 /// </summary> 93 [ Name(false)]93 [Convention(Notation.PascalCase)] 94 94 public static double HSV_VALUE = 0.65; 95 95 … … 97 97 /// Sprited icons and images. 98 98 /// </summary> 99 [ Name(false)]99 [Convention(Notation.PascalCase)] 100 100 public static object SPRITE = new { 101 101 width = 96, … … 107 107 /// Required name space for SVG elements. 108 108 /// </summary> 109 [ Name(false)]109 [Convention(Notation.PascalCase)] 110 110 public static readonly string SVG_NS = "http://www.w3.org/2000/svg"; 111 111 … … 113 113 /// Required name space for HTML elements. 114 114 /// </summary> 115 [ Name(false)]115 [Convention(Notation.PascalCase)] 116 116 public static readonly string HTML_NS = "http://www.w3.org/1999/xhtml"; 117 117 … … 119 119 /// ENUM for a right-facing value input. E.g. 'set item to' or 'return'. 120 120 /// </summary> 121 [ Name(false)]121 [Convention(Notation.PascalCase)] 122 122 public static int INPUT_VALUE = 1; 123 123 … … 125 125 /// ENUM for a left-facing value output. E.g. 'random fraction'. 126 126 /// </summary> 127 [ Name(false)]127 [Convention(Notation.PascalCase)] 128 128 public static int OUTPUT_VALUE = 2; 129 129 … … 131 131 /// ENUM for a down-facing block stack. E.g. 'if-do' or 'else'. 132 132 /// </summary> 133 [ Name(false)]133 [Convention(Notation.PascalCase)] 134 134 public static int NEXT_STATEMENT = 3; 135 135 … … 137 137 /// ENUM for an up-facing block stack. E.g. 'break out of loop'. 138 138 /// </summary> 139 [ Name(false)]139 [Convention(Notation.PascalCase)] 140 140 public static int PREVIOUS_STATEMENT = 4; 141 141 … … 143 143 /// ENUM for an dummy input. Used to add field(s) with no input. 144 144 /// </summary> 145 [ Name(false)]145 [Convention(Notation.PascalCase)] 146 146 public static int DUMMY_INPUT = 5; 147 147 … … 149 149 /// ENUM for left alignment. 150 150 /// </summary> 151 [ Name(false)]151 [Convention(Notation.PascalCase)] 152 152 public static int ALIGN_LEFT = -1; 153 153 … … 155 155 /// ENUM for centre alignment. 156 156 /// </summary> 157 [ Name(false)]157 [Convention(Notation.PascalCase)] 158 158 public static int ALIGN_CENTRE = 0; 159 159 … … 161 161 /// ENUM for right alignment. 162 162 /// </summary> 163 [ Name(false)]163 [Convention(Notation.PascalCase)] 164 164 public static int ALIGN_RIGHT = 1; 165 165 … … 167 167 /// ENUM for no drag operation. 168 168 /// </summary> 169 [ Name(false)]169 [Convention(Notation.PascalCase)] 170 170 public static int DRAG_NONE = 0; 171 171 … … 173 173 /// ENUM for inside the sticky DRAG_RADIUS. 174 174 /// </summary> 175 [ Name(false)]175 [Convention(Notation.PascalCase)] 176 176 public static int DRAG_STICKY = 1; 177 177 … … 180 180 /// clicks and drags. 181 181 /// </summary> 182 [ Name(false)]182 [Convention(Notation.PascalCase)] 183 183 public static int DRAG_BEGIN = 1; 184 184 … … 186 186 /// ENUM for freely draggable (outside the DRAG_RADIUS, if one applies). 187 187 /// </summary> 188 [ Name(false)]188 [Convention(Notation.PascalCase)] 189 189 public static int DRAG_FREE = 2; 190 190 … … 192 192 /// Lookup table for determining the opposite type of a connection. 193 193 /// </summary> 194 [ Name(false)]194 [Convention(Notation.PascalCase)] 195 195 public static int[] OPPOSITE_TYPE = { 196 196 0, … … 204 204 /// ENUM for toolbox and flyout at top of screen. 205 205 /// </summary> 206 [ Name(false)]206 [Convention(Notation.PascalCase)] 207 207 public static int TOOLBOX_AT_TOP = 0; 208 208 … … 210 210 /// ENUM for toolbox and flyout at bottom of screen. 211 211 /// </summary> 212 [ Name(false)]212 [Convention(Notation.PascalCase)] 213 213 public static int TOOLBOX_AT_BOTTOM = 1; 214 214 … … 216 216 /// ENUM for toolbox and flyout at left of screen. 217 217 /// </summary> 218 [ Name(false)]218 [Convention(Notation.PascalCase)] 219 219 public static int TOOLBOX_AT_LEFT = 2; 220 220 … … 222 222 /// ENUM for toolbox and flyout at right of screen. 223 223 /// </summary> 224 [ Name(false)]224 [Convention(Notation.PascalCase)] 225 225 public static int TOOLBOX_AT_RIGHT = 3; 226 226 … … 236 236 public static Block selected; 237 237 238 [ Name(false)]238 [Convention(Notation.PascalCase)] 239 239 public static Blocks Blocks; 240 240 … … 1485 1485 public class BlockSvg : Block 1486 1486 { 1487 [ Name(false)]1487 [Convention(Notation.PascalCase)] 1488 1488 public int TAB_HEIGHT = 20; 1489 1489 … … 1739 1739 /// Non-breaking space. 1740 1740 /// </summary> 1741 [ Name(false)]1741 [Convention(Notation.PascalCase)] 1742 1742 public const string NBSP = "\u00A0"; 1743 1743 … … 1745 1745 /// Editable fields are saved by the XML renderer, non-editable fields are not. 1746 1746 /// </summary> 1747 [ Name(false)]1747 [Convention(Notation.PascalCase)] 1748 1748 public bool EDITABLE = true; 1749 1749 -
EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Loops.cs
r321 r425 345 345 var block = (Block)this; 346 346 do { 347 if ( this.LOOP_TYPES.IndexOf(block.type) != -1) {347 if (Array.IndexOf(this.LOOP_TYPES, block.type) != -1) { 348 348 legal = true; 349 349 break; -
EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs
r321 r425 28 28 using Bridge; 29 29 using Bridge.Html5; 30 using Bridge.Text.RegularExpressions;31 30 32 31 namespace WebMrbc … … 504 503 public string validator_(string newVar) 505 504 { 506 newVar = newVar.Replace(new Reg ex("[\\s\\xa0]+", "g"), " ").Replace(new Regex("^ | $", "g"), "");505 newVar = newVar.Replace(new RegExp("[\\s\\xa0]+", "g"), " ").Replace(new RegExp("^ | $", "g"), ""); 507 506 return newVar; 508 507 } … … 630 629 this.quarkConnections_[this.quarkIds_[i]] = connection; 631 630 if (mutatorOpen && connection != null && 632 paramIds.IndexOf(this.quarkIds_[i]) == -1) {631 Array.IndexOf(paramIds, this.quarkIds_[i]) == -1) { 633 632 // This connection should no longer be attached to this block. 634 633 connection.disconnect(); … … 638 637 } 639 638 // Rebuild the block's arguments. 640 this.arguments_ = ( string[])(new string[0]).Concat(paramNames);639 this.arguments_ = (new string[0]).Concat(paramNames).ToArray(); 641 640 this.updateShape_(); 642 641 this.quarkIds_ = paramIds; … … 781 780 } 782 781 if (e.type == Events.CREATE && 783 ((Create)e).ids.IndexOf(this.id) != -1) {782 Array.IndexOf(((Create)e).ids, this.id) != -1) { 784 783 // Look for the case where a procedure call was created (usually through 785 784 // paste) and there is no matching definition. In this case, create … … 988 987 var block = (Block)this; 989 988 do { 990 if ( this.FUNCTION_TYPES.IndexOf(block.type) != -1) {989 if (Array.IndexOf(this.FUNCTION_TYPES, block.type) != -1) { 991 990 legal = true; 992 991 break; -
EcnlProtoTool/trunk/webapp/webmrbc/Collection.cs
r321 r425 39 39 using System.Collections.Generic; 40 40 using Bridge; 41 using Bridge.Linq;42 using Bridge.Text.RegularExpressions;43 41 using System.Collections; 42 using Bridge.Html5; 44 43 45 44 namespace WebMrbc … … 76 75 internal void Remove(T item) 77 76 { 78 var i = List.IndexOf(item);77 var i = Array.IndexOf(List, item); 79 78 if (i >= 0) 80 79 List.Splice(i, 1); … … 95 94 { 96 95 List.Splice(0, List.Length); 97 List = (T[])List.Concat(n);96 List = List.Concat(n).ToArray(); 98 97 99 98 if (OnReset != null) … … 115 114 116 115 var max = 0; 117 var n = new Reg ex("^" + identifier + "([0-9]+)$");116 var n = new RegExp("^" + identifier + "([0-9]+)$"); 118 117 foreach (var c in List) { 119 118 var m = c.Identifier.Match(n); -
EcnlProtoTool/trunk/webapp/webmrbc/EObjectModalView.cs
r321 r425 298 298 } 299 299 300 [Convention(Notation.CamelCase)] 300 301 public void OnChangeIdentifier(Element ele) 301 302 { … … 304 305 } 305 306 307 [Convention(Notation.CamelCase)] 306 308 public void OnSelectAttribute(Element sender, string attribute) 307 309 { … … 310 312 } 311 313 314 [Convention(Notation.CamelCase)] 312 315 public void OnSelectClassGroupCode(jQueryMouseEvent e) 313 316 { … … 318 321 } 319 322 323 [Convention(Notation.CamelCase)] 320 324 public void OnSelectClassCode(jQueryMouseEvent e) 321 325 { … … 323 327 } 324 328 329 [Convention(Notation.CamelCase)] 325 330 public void OnChangeInstanceCode(Element sender) 326 331 { … … 328 333 } 329 334 335 [Convention(Notation.CamelCase)] 330 336 public void OnOk(Element ele) 331 337 { … … 384 390 } 385 391 392 [Convention(Notation.CamelCase)] 386 393 public void OnCancel(Element ele) 387 394 { -
EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/CodeGenerator.cs
r321 r425 40 40 using System.Text; 41 41 using Bridge; 42 using Bridge. Text.RegularExpressions;42 using Bridge.Html5; 43 43 44 44 namespace WebMrbc … … 61 61 result = result.Substring(0, result.Length - 4); 62 62 63 if (!new Reg ex("^[A-Z][A-Za-z0-9_]+$").Test(result)) {63 if (!new RegExp("^[A-Z][A-Za-z0-9_]+$").Test(result)) { 64 64 result = String.Format("Cls{0:X2}{1:X2}", cls.classGroup.classGroupCode, cls.classCode); 65 65 } … … 74 74 string result = fi.identifier; 75 75 76 if (!new Reg ex("^[A-Za-z_][A-Za-z0-9_]+$").Test(result)) {76 if (!new RegExp("^[A-Za-z_][A-Za-z0-9_]+$").Test(result)) { 77 77 result = String.Format("property{0:X2}", pi.propertyCode); 78 78 } 79 79 else { 80 var reg = new Reg ex("[A-Z][a-z]+", "g");80 var reg = new RegExp("[A-Z][a-z]+", "g"); 81 81 string[] m; 82 82 if ((m = reg.Exec(result)) != null) { -
EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectBlock.cs
r321 r425 40 40 using System.Text; 41 41 using Bridge; 42 using Bridge.Linq;43 42 using Bridge.Html5; 44 43 -
EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/ValueRange.cs
r321 r425 40 40 using System.Collections.Generic; 41 41 using Bridge; 42 using Bridge. Text.RegularExpressions;42 using Bridge.Html5; 43 43 44 44 namespace WebMrbc … … 412 412 int pos = 0; 413 413 while (pos < input.Length) { 414 Reg exms;414 RegExp ms; 415 415 string[] m; 416 if ((m = (ms = new Reg ex(TokenInfo.HexValue)).Exec(input.Substring(pos))) != null) {416 if ((m = (ms = new RegExp(TokenInfo.HexValue)).Exec(input.Substring(pos))) != null) { 417 417 tokens.Push(new TokenInfo(m[0], TokenType.HexValue)); 418 418 pos += m[0].Length; 419 419 } 420 else if ((m = (ms = new Reg ex(TokenInfo.Numeric)).Exec(input.Substring(pos))) != null) {420 else if ((m = (ms = new RegExp(TokenInfo.Numeric)).Exec(input.Substring(pos))) != null) { 421 421 tokens.Push(new TokenInfo(m[0], TokenType.Numeric)); 422 422 pos += m[0].Length; 423 423 } 424 424 else { 425 if ((m = (ms = new Reg ex(TokenInfo.Separetor)).Exec(input.Substring(pos))) == null) {425 if ((m = (ms = new RegExp(TokenInfo.Separetor)).Exec(input.Substring(pos))) == null) { 426 426 tokens.Push(new TokenInfo(input.Substring(pos), TokenType.String)); 427 427 break; … … 747 747 748 748 if (emti.primitive) { 749 string[] lines = valrng.Split(new Reg ex("\r\n"));749 string[] lines = valrng.Split(new RegExp("\r\n")); 750 750 foreach (string line in lines) { 751 if (new Reg ex("^<(.+)>$").Test(line))751 if (new RegExp("^<(.+)>$").Test(line)) 752 752 continue; 753 753 … … 773 773 } 774 774 775 valueRange._Values = (Option[])valueRange._Values.Concat(values);776 valueRange._Ranges = (Range[])valueRange._Ranges.Concat(ranges);775 valueRange._Values = valueRange._Values.Concat(values).ToArray(); 776 valueRange._Ranges = valueRange._Ranges.Concat(ranges).ToArray(); 777 777 if (bitField != null) 778 778 valueRange._BitFields.Push(bitField); -
EcnlProtoTool/trunk/webapp/webmrbc/Generator.cs
r321 r425 30 30 using System.Runtime.InteropServices; 31 31 using Bridge; 32 using Bridge. Text.RegularExpressions;32 using Bridge.Html5; 33 33 34 34 namespace WebMrbc … … 47 47 this.name_ = name; 48 48 this.FUNCTION_NAME_PLACEHOLDER_REGEXP_ = 49 new Reg ex(this.FUNCTION_NAME_PLACEHOLDER_, "g");49 new RegExp(this.FUNCTION_NAME_PLACEHOLDER_, "g"); 50 50 } 51 51 … … 120 120 line = this.scrubNakedValue(line); 121 121 } 122 nodes = (node[])nodes.Concat(line);122 nodes = nodes.Concat(line).ToArray(); 123 123 } 124 124 } … … 137 137 public string prefixLines(string text, string prefix) 138 138 { 139 return prefix + text.Replace(new Reg ex("(?!\n$)\n"), "\n" + prefix);139 return prefix + text.Replace(new RegExp("(?!\n$)\n"), "\n" + prefix); 140 140 } 141 141 … … 271 271 /// </summary> 272 272 public string FUNCTION_NAME_PLACEHOLDER_ = "{leCUI8hutHZI4480Dc}"; 273 public Reg exFUNCTION_NAME_PLACEHOLDER_REGEXP_;273 public RegExp FUNCTION_NAME_PLACEHOLDER_REGEXP_; 274 274 } 275 275 } -
EcnlProtoTool/trunk/webapp/webmrbc/MainMenuView.cs
r321 r425 43 43 using Bridge.Html5; 44 44 using Bridge.jQuery2; 45 using Bridge.Text.RegularExpressions;46 45 47 46 namespace WebMrbc … … 120 119 121 120 if (String.IsNullOrEmpty(outfile) && (i + 1 < rubyfiles.Length)) 122 outfile = rubyfiles[i + 1].Replace(new Reg ex(".rb$", "g"), ext.StartsWith(".") ? ext : ("." + ext));121 outfile = rubyfiles[i + 1].Replace(new RegExp(".rb$", "g"), ext.StartsWith(".") ? ext : ("." + ext)); 123 122 rubyfiles[i] = outfile; 124 123 } -
EcnlProtoTool/trunk/webapp/webmrbc/MrbAstNodes.cs
r321 r425 563 563 : base(p, node_type.NODE_SCOPE) 564 564 { 565 _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());565 _local_variables = _local_variables.Concat(p.locals_node()).ToArray(); 566 566 _body = body; 567 567 } … … 615 615 : base(p, node_type.NODE_BEGIN) 616 616 { 617 _progs = (node[])_progs.Concat(progs);617 _progs = _progs.Concat(progs).ToArray(); 618 618 } 619 619 … … 1465 1465 { 1466 1466 _arg = a; 1467 _when = (when_t[])_when.Concat(b);1467 _when = _when.Concat(b).ToArray(); 1468 1468 } 1469 1469 … … 1658 1658 _method = b; 1659 1659 if (args != null) 1660 _args = (node[])_args.Concat(args);1660 _args = _args.Concat(args).ToArray(); 1661 1661 _block = block; 1662 1662 } … … 1913 1913 _method = b; 1914 1914 if (args != null) 1915 _args = (node[])_args.Concat(args);1915 _args = _args.Concat(args).ToArray(); 1916 1916 _block = block; 1917 1917 } … … 2029 2029 : base(p, node_type.NODE_SUPER) 2030 2030 { 2031 _args = (node[])_args.Concat(args);2031 _args = _args.Concat(args).ToArray(); 2032 2032 } 2033 2033 … … 2663 2663 : base(p, node_type.NODE_ARRAY) 2664 2664 { 2665 _array = (node[])_array.Concat(a);2665 _array = _array.Concat(a).ToArray(); 2666 2666 _item_per_line = item_per_line; 2667 2667 } … … 2794 2794 : base(p, node_type.NODE_HASH) 2795 2795 { 2796 _kvs = (kv_t[])_kvs.Concat(items);2796 _kvs = _kvs.Concat(items).ToArray(); 2797 2797 } 2798 2798 … … 3347 3347 { 3348 3348 _name = m; 3349 _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());3349 _local_variables = _local_variables.Concat(p.locals_node()).ToArray(); 3350 3350 if (a != null) { 3351 3351 node n = a; … … 3388 3388 { 3389 3389 _name = m; 3390 _mandatory_args = (arg_node[])_mandatory_args.Concat(a);3390 _mandatory_args = _mandatory_args.Concat(a).ToArray(); 3391 3391 _body = b; 3392 3392 } … … 3677 3677 : base(p, node_type.NODE_BLOCK) 3678 3678 { 3679 _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());3679 _local_variables = _local_variables.Concat(p.locals_node()).ToArray(); 3680 3680 if (args != null) { 3681 3681 node n = args; … … 3718 3718 : base(p, node_type.NODE_BLOCK) 3719 3719 { 3720 _mandatory_args = (node[])_mandatory_args.Concat(args);3720 _mandatory_args = _mandatory_args.Concat(args).ToArray(); 3721 3721 _body = body; 3722 3722 if (_body is ensure_node) { … … 3815 3815 : base(p, node_type.NODE_LAMBDA) 3816 3816 { 3817 _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());3817 _local_variables = _local_variables.Concat(p.locals_node()).ToArray(); 3818 3818 if (a != null) { 3819 3819 node n = a; -
EcnlProtoTool/trunk/webapp/webmrbc/MrbScanner.cs
r321 r425 342 342 if (utf32 >= 0x10000) { 343 343 var ch = utf32 - 0x10000; 344 str += String .FromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));344 str += StringPrototype.FromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); 345 345 } 346 346 else { 347 str += String .FromCharCode(utf32);347 str += StringPrototype.FromCharCode(utf32); 348 348 } 349 349 return str; … … 506 506 private mrb_sym get_sym(string str) 507 507 { 508 int i = syms.IndexOf(str);508 int i = Array.IndexOf(syms, str); 509 509 if (i < 0) { 510 510 i = syms.Length; -
EcnlProtoTool/trunk/webapp/webmrbc/Mruby.cs
r321 r425 40 40 using Bridge; 41 41 using Bridge.Html5; 42 using Bridge.Text.RegularExpressions;43 42 44 43 namespace WebMrbc … … 141 140 var progressElement = (HTMLProgressElement)Document.GetElementById("progress"); 142 141 var spinnerElement = (HTMLDivElement)Document.GetElementById("spinner"); 143 var m = text.Match(new Reg ex(@"([^(]+)\((\d+(\.\d+)?)\/(\d+)\)"));142 var m = text.Match(new RegExp(@"([^(]+)\((\d+(\.\d+)?)\/(\d+)\)")); 144 143 var now = DateTime.Now.Ticks; 145 144 if (m != null && now - DateTime.Now.Ticks < 30) return; // if this is a progress update, skip it if too soon … … 170 169 } 171 170 172 [External, Name(false)]171 [External, Convention(Notation.PascalCase)] 173 172 internal string UTF8ArrayToString(Uint8Array buf, int index) 174 173 { … … 194 193 } 195 194 196 [ Name(false)]195 [Convention(Notation.PascalCase)] 197 196 internal Uint8Array UTF8StringToArray(string str) 198 197 { -
EcnlProtoTool/trunk/webapp/webmrbc/Names.cs
r321 r425 25 25 using System.Runtime.InteropServices; 26 26 using Bridge; 27 using Bridge. Text.RegularExpressions;27 using Bridge.Html5; 28 28 29 29 namespace WebMrbc … … 91 91 } 92 92 var safeName = this.getDistinctName(name, type); 93 this.db_[normalized] = safeName.Substr (prefix.Length);93 this.db_[normalized] = safeName.Substring(prefix.Length); 94 94 return safeName; 95 95 } … … 137 137 // Unfortunately names in non-latin characters will look like 138 138 // _E9_9F_B3_E4_B9_90 which is pretty meaningless. 139 name = Script.EncodeURI(name.Replace(new Reg ex(" "), "_").Replace(new Regex(@"[^\w]"), "_"));139 name = Script.EncodeURI(name.Replace(new RegExp(" "), "_").Replace(new RegExp(@"[^\w]"), "_")); 140 140 // Most languages don't allow names with leading numbers. 141 141 if ("0123456789".IndexOf(name[0]) != -1) { -
EcnlProtoTool/trunk/webapp/webmrbc/Procedures.cs
r321 r425 28 28 using Bridge; 29 29 using Bridge.Html5; 30 using Bridge.Text.RegularExpressions;31 30 using WebMrbc; 32 31 … … 103 102 while (!isLegalName_(name, block.workspace, block)) { 104 103 // Collision with another procedure. 105 var r = new Reg ex(@"^(.*?)(\d+)$").Exec(name);104 var r = new RegExp(@"^(.*?)(\d+)$").Exec(name); 106 105 if (r == null) { 107 106 name += "2"; … … 152 151 { 153 152 // Strip leading and trailing whitespace. Beyond this, all names are legal. 154 name = name.Replace(new Reg ex(@"^[\s\xa0] +|[\s\xa0] +$"), "");153 name = name.Replace(new RegExp(@"^[\s\xa0] +|[\s\xa0] +$"), ""); 155 154 156 155 // Ensure two identically-named procedures don't exist. -
EcnlProtoTool/trunk/webapp/webmrbc/Ruby.cs
r321 r425 6 6 using System.Linq; 7 7 using Bridge; 8 using Bridge.Text.RegularExpressions;9 8 using System.Collections.Generic; 10 9 using System.Runtime.InteropServices; … … 115 114 if (nextCode == null) 116 115 return code; 117 return (node[])code.Concat(nextCode);116 return code.Concat(nextCode).ToArray(); 118 117 } 119 118 … … 126 125 private mrb_sym get_sym(string str) 127 126 { 128 int i = syms.IndexOf(str);127 int i = Array.IndexOf(syms, str); 129 128 if (i < 0) { 130 129 i = syms.Length; … … 149 148 mrb_sym get_var_name(string str) 150 149 { 151 int i = syms.IndexOf(str);150 int i = Array.IndexOf(syms, str); 152 151 153 152 // ローカル変数なら登録されているはずなので、 -
EcnlProtoTool/trunk/webapp/webmrbc/Variables.cs
r321 r425 28 28 using Bridge; 29 29 using Bridge.Html5; 30 using Bridge.Text.RegularExpressions;31 30 using WebMrbc; 32 31 … … 299 298 // Beyond this, all names are legal. 300 299 if (newVar != null) { 301 newVar = newVar.Replace(new Reg ex(@"[\s\xa0] +"), " ").Replace(new Regex("^ | $"), "");300 newVar = newVar.Replace(new RegExp(@"[\s\xa0] +"), " ").Replace(new RegExp("^ | $"), ""); 302 301 if (newVar == Msg.RENAME_VARIABLE || 303 302 newVar == Msg.NEW_VARIABLE) { -
EcnlProtoTool/trunk/webapp/webmrbc/packages.config
r270 r425 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <packages> 3 <package id="Bridge" version="1 5.7.0" targetFramework="net45" />4 <package id="Bridge.Bootstrap" version="3. 9.4" targetFramework="net45" />5 <package id="Bridge.Core" version="1 5.7.0" targetFramework="net45" />6 <package id="Bridge.Html5" version="1 5.7.0" targetFramework="net45" />7 <package id="Bridge.jQuery" version="2. 9.3" targetFramework="net45" />8 <package id="Bridge.Min" version="1 5.7.0" targetFramework="net45" />9 <package id="Bridge.WebGL" version="1. 8.3" targetFramework="net45" />3 <package id="Bridge" version="17.10.1" targetFramework="net45" /> 4 <package id="Bridge.Bootstrap" version="3.24.0" targetFramework="net45" /> 5 <package id="Bridge.Core" version="17.10.1" targetFramework="net45" /> 6 <package id="Bridge.Html5" version="17.10.0" targetFramework="net45" /> 7 <package id="Bridge.jQuery" version="2.24.0" targetFramework="net45" /> 8 <package id="Bridge.Min" version="17.10.1" targetFramework="net45" /> 9 <package id="Bridge.WebGL" version="1.23.0" targetFramework="net45" /> 10 10 </packages> -
EcnlProtoTool/trunk/webapp/webmrbc/webmrbc.csproj
r273 r425 23 23 <NuGetPackageImportStamp> 24 24 </NuGetPackageImportStamp> 25 <Use64BitIISExpress /> 25 26 </PropertyGroup> 26 27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 43 44 <NoStdLib>true</NoStdLib> 44 45 </PropertyGroup> 45 <ItemGroup>46 <Reference Include="Bridge, Version=15.7.0.0, Culture=neutral, processorArchitecture=MSIL">47 <HintPath>..\packages\Bridge.Core.15.7.0\lib\net40\Bridge.dll</HintPath>48 <Private>True</Private>49 </Reference>50 <Reference Include="Bridge.Bootstrap3, Version=3.9.0.0, Culture=neutral, processorArchitecture=MSIL">51 <HintPath>..\packages\Bridge.Bootstrap.3.9.4\lib\net40\Bridge.Bootstrap3.dll</HintPath>52 <Private>True</Private>53 </Reference>54 <Reference Include="Bridge.Html5, Version=15.7.0.0, Culture=neutral, processorArchitecture=MSIL">55 <HintPath>..\packages\Bridge.Html5.15.7.0\lib\net40\Bridge.Html5.dll</HintPath>56 <Private>True</Private>57 </Reference>58 <Reference Include="Bridge.jQuery2, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">59 <HintPath>..\packages\Bridge.jQuery.2.9.3\lib\net40\Bridge.jQuery2.dll</HintPath>60 <Private>True</Private>61 </Reference>62 <Reference Include="Bridge.WebGL, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">63 <HintPath>..\packages\Bridge.WebGL.1.8.3\lib\net40\Bridge.WebGL.dll</HintPath>64 <Private>True</Private>65 </Reference>66 </ItemGroup>67 46 <ItemGroup> 68 47 <Content Include="ace\ace.js" /> … … 89 68 <Content Include="xterm\src\xterm.css" /> 90 69 <Content Include="xterm\src\xterm.js" /> 91 <Content Include="packages.config" />92 70 <Content Include="Bridge\bridge.json" /> 93 71 <Content Include="bootstrap\fonts\glyphicons-halflings-regular.eot" /> … … 97 75 <Content Include="echonet_objects.json" /> 98 76 <Content Include="information.json" /> 77 <Content Include="bridge.json" /> 78 <None Include="packages.config" /> 99 79 <None Include="Web.Debug.config"> 100 80 <DependentUpon>Web.config</DependentUpon> … … 171 151 <Compile Include="XTerm.cs" /> 172 152 </ItemGroup> 153 <ItemGroup> 154 <Reference Include="Bridge, Version=17.10.0.0, Culture=neutral, processorArchitecture=MSIL"> 155 <HintPath>..\packages\Bridge.Core.17.10.1\lib\net40\Bridge.dll</HintPath> 156 </Reference> 157 <Reference Include="Bridge.Bootstrap3, Version=3.24.0.0, Culture=neutral, processorArchitecture=MSIL"> 158 <HintPath>..\packages\Bridge.Bootstrap.3.24.0\lib\net40\Bridge.Bootstrap3.dll</HintPath> 159 </Reference> 160 <Reference Include="Bridge.Html5, Version=17.10.0.0, Culture=neutral, processorArchitecture=MSIL"> 161 <HintPath>..\packages\Bridge.Html5.17.10.0\lib\net40\Bridge.Html5.dll</HintPath> 162 </Reference> 163 <Reference Include="Bridge.jQuery2, Version=2.24.0.0, Culture=neutral, processorArchitecture=MSIL"> 164 <HintPath>..\packages\Bridge.jQuery.2.24.0\lib\net40\Bridge.jQuery2.dll</HintPath> 165 </Reference> 166 <Reference Include="Bridge.WebGL, Version=1.23.0.0, Culture=neutral, processorArchitecture=MSIL"> 167 <HintPath>..\packages\Bridge.WebGL.1.23.0\lib\net40\Bridge.WebGL.dll</HintPath> 168 </Reference> 169 </ItemGroup> 173 170 <PropertyGroup> 174 171 <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> … … 196 193 </VisualStudio> 197 194 </ProjectExtensions> 198 <Import Project="..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets" Condition="Exists('..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets')" /> 195 <PropertyGroup> 196 <PostBuildEvent>cd $(ProjectDir) 197 call copy.bat</PostBuildEvent> 198 </PropertyGroup> 199 <Import Project="..\packages\Bridge.Min.17.10.1\build\Bridge.Min.targets" Condition="Exists('..\packages\Bridge.Min.17.10.1\build\Bridge.Min.targets')" /> 199 200 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> 200 201 <PropertyGroup> 201 202 <ErrorText>このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。</ErrorText> 202 203 </PropertyGroup> 203 <Error Condition="!Exists('..\packages\Bridge.Min.1 5.7.0\build\Bridge.Min.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets'))" />204 <Error Condition="!Exists('..\packages\Bridge.Min.17.10.1\build\Bridge.Min.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Bridge.Min.17.10.1\build\Bridge.Min.targets'))" /> 204 205 </Target> 205 <PropertyGroup>206 <PostBuildEvent>cd $(ProjectDir)207 call copy.bat</PostBuildEvent>208 </PropertyGroup>209 206 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 210 207 Other similar extension points exist, see Microsoft.Common.targets.
Note:
See TracChangeset
for help on using the changeset viewer.