Changeset 425 for EcnlProtoTool/trunk


Ignore:
Timestamp:
May 29, 2020, 10:45:52 PM (4 years ago)
Author:
coas-nagasima
Message:

Visual Studio 2019 と Bridge.NET でビルドできるよう更新。

Location:
EcnlProtoTool/trunk/webapp
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/webapp/webmrbc.sln

    r270 r425  
    11
    22Microsoft Visual Studio Solution File, Format Version 12.00
    3 # Visual Studio 14
    4 VisualStudioVersion = 14.0.25420.1
     3# Visual Studio Version 16
     4VisualStudioVersion = 16.0.29102.190
    55MinimumVisualStudioVersion = 10.0.40219.1
    66Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "webmrbc", "webmrbc\webmrbc.csproj", "{7E71D3E4-F61A-4423-994A-EB307D7618E0}"
     
    2020                HideSolutionNode = FALSE
    2121        EndGlobalSection
     22        GlobalSection(ExtensibilityGlobals) = postSolution
     23                SolutionGuid = {537ABA34-4886-472B-81D4-8ECE70055369}
     24        EndGlobalSection
    2225EndGlobal
  • EcnlProtoTool/trunk/webapp/webmrbc/App.cs

    r321 r425  
    174174                                        }
    175175                                        if ((item.classGroupCode == 0xE) && (cls.classCode == 0xF0)) {
    176                                                 cls.properties = (JsonPropertyInfo[])profProps.Concat(properties);
     176                                                cls.properties = profProps.Concat(properties).ToArray();
    177177                                                NodeProfileClass = cls;
    178178                                        }
     
    344344        public class Collections
    345345        {
    346                 [Name(false)]
     346                [Convention(Notation.PascalCase)]
    347347                internal static ENodeWorkspace LocalNode;
    348                 [Name(false)]
     348                [Convention(Notation.PascalCase)]
    349349                internal static Collection<IClassWorkspace> ClassWorkspaces;
    350                 [Name(false)]
     350                [Convention(Notation.PascalCase)]
    351351                internal static EcnlTaskWorkspace EcnlTaskWorkspace;
    352                 [Name(false)]
     352                [Convention(Notation.PascalCase)]
    353353                internal static MainLoopWorkspace MainLoopWorkspace;
    354354        }
     
    356356        public class Views
    357357        {
    358                 [Name(false)]
     358                [Convention(Notation.PascalCase)]
    359359                internal static MainMenuView MainMenuView;
    360                 [Name(false)]
     360                [Convention(Notation.PascalCase)]
    361361                internal static ClassSelectorView ClassSelectorView;
    362                 [Name(false)]
     362                [Convention(Notation.PascalCase)]
    363363                internal static EObjectModalView EObjectModalView;
    364364        }
     
    408408                                        byte b = bytes[i + index];
    409409                                        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";
    411411                                        else
    412                                                 sb += String.FromCharCode(b);
     412                                                sb += StringPrototype.FromCharCode(b);
    413413                                }
    414414                        }
  • EcnlProtoTool/trunk/webapp/webmrbc/Arduino/KernelBlock.cs

    r321 r425  
    3838using System.Collections.Generic;
    3939using System.Linq;
    40 using Bridge.Text.RegularExpressions;
     40using Bridge.Html5;
    4141
    4242namespace WebMrbc
     
    451451                public string validator(string text)
    452452                {
    453                         text = text.Replace(new Regex("[^0-9a-fA-F]+", "g"), "");
     453                        text = text.Replace(new RegExp("[^0-9a-fA-F]+", "g"), "");
    454454                        return text;
    455455                }
  • EcnlProtoTool/trunk/webapp/webmrbc/Block.cs

    r321 r425  
    4646                public string type;
    4747
    48                 [External, FieldProperty]
     48                [External, Field]
    4949                public string id { get; set; }
    50                 [External, FieldProperty]
     50                [External, Field]
    5151                public Connection outputConnection { get; set; }
    52                 [External, FieldProperty]
     52                [External, Field]
    5353                public Connection nextConnection { get; set; }
    54                 [External, FieldProperty]
     54                [External, Field]
    5555                public Connection previousConnection { get; set; }
    56                 [External, FieldProperty]
     56                [External, Field]
    5757                public Input[] inputList { get; set; }
    58                 [External, FieldProperty]
     58                [External, Field]
    5959                public bool inputsInline { get; set; }
    60                 [External, FieldProperty]
     60                [External, Field]
    6161                public bool disabled { get; set; }
    62                 [External, FieldProperty]
     62                [External, Field]
    6363                public string tooltip { get; set; }
    64                 [External, FieldProperty]
     64                [External, Field]
    6565                public bool contextMenu { get; set; }
    66                 [External, FieldProperty]
     66                [External, Field]
    6767                public string contextMenuMsg_ { get; set; }
    68                 [External, FieldProperty]
     68                [External, Field]
    6969                public Union<string, Comment> comment { get; set; }
    70                 [External, FieldProperty]
     70                [External, Field]
    7171                public bool RTL { get; set; }
    72                 [External, FieldProperty]
     72                [External, Field]
    7373                public Block[] prevBlocks_ { get; set; }
    74                 [External, FieldProperty]
     74                [External, Field]
    7575                public Workspace workspace { get; set; }
    76                 [External, FieldProperty]
     76                [External, Field]
    7777                public Mutator mutator { get; set; }
    78                 [External, FieldProperty]
     78                [External, Field]
    7979                public bool isInFlyout { get; }
    8080
  • EcnlProtoTool/trunk/webapp/webmrbc/Blockly.cs

    r321 r425  
    3232        public partial class Blockly
    3333        {
    34                 [Name(false)]
     34                [Convention(Notation.PascalCase)]
    3535                public static Xml Xml;
    36                 [Name(false)]
     36                [Convention(Notation.PascalCase)]
    3737                public static Events Events;
    38                 [Name(false)]
     38                [Convention(Notation.PascalCase)]
    3939                public static Procedures Procedures;
    40                 [Name(false)]
     40                [Convention(Notation.PascalCase)]
    4141                public static Variables Variables;
    42                 [Name(false)]
     42                [Convention(Notation.PascalCase)]
    4343                public static Names Names;
    4444
     
    4646                /// Number of pixels the mouse must move before a drag starts.
    4747                /// </summary>
    48                 [Name(false)]
     48                [Convention(Notation.PascalCase)]
    4949                public static int DRAG_RADIUS = 5;
    5050
     
    5252                /// Maximum misalignment between connections for them to snap together.
    5353                /// </summary>
    54                 [Name(false)]
     54                [Convention(Notation.PascalCase)]
    5555                public static int SNAP_RADIUS = 20;
    5656
     
    5858                /// Delay in ms between trigger and bumping unconnected block out of alignment.
    5959                /// </summary>
    60                 [Name(false)]
     60                [Convention(Notation.PascalCase)]
    6161                public static int BUMP_DELAY = 250;
    6262
     
    6464                /// Number of characters to truncate a collapsed block to.
    6565                /// </summary>
    66                 [Name(false)]
     66                [Convention(Notation.PascalCase)]
    6767                public static int COLLAPSE_CHARS = 30;
    6868
     
    7070                /// Length in ms for a touch to become a long press.
    7171                /// </summary>
    72                 [Name(false)]
     72                [Convention(Notation.PascalCase)]
    7373                public static int LONGPRESS = 750;
    7474
     
    7777                /// miliseconds.
    7878                /// </summary>
    79                 [Name(false)]
     79                [Convention(Notation.PascalCase)]
    8080                public static int SOUND_LIMIT = 100;
    8181
     
    8484                /// Must be in the range of 0 (inclusive) to 1 (exclusive).
    8585                /// </summary>
    86                 [Name(false)]
     86                [Convention(Notation.PascalCase)]
    8787                public static double HSV_SATURATION = 0.45;
    8888
     
    9191                /// Must be in the range of 0 (inclusive) to 1 (exclusive).
    9292                /// </summary>
    93                 [Name(false)]
     93                [Convention(Notation.PascalCase)]
    9494                public static double HSV_VALUE = 0.65;
    9595
     
    9797                /// Sprited icons and images.
    9898                /// </summary>
    99                 [Name(false)]
     99                [Convention(Notation.PascalCase)]
    100100                public static object SPRITE = new {
    101101                        width = 96,
     
    107107                /// Required name space for SVG elements.
    108108                /// </summary>
    109                 [Name(false)]
     109                [Convention(Notation.PascalCase)]
    110110                public static readonly string SVG_NS = "http://www.w3.org/2000/svg";
    111111
     
    113113                /// Required name space for HTML elements.
    114114                /// </summary>
    115                 [Name(false)]
     115                [Convention(Notation.PascalCase)]
    116116                public static readonly string HTML_NS = "http://www.w3.org/1999/xhtml";
    117117
     
    119119                /// ENUM for a right-facing value input.  E.g. 'set item to' or 'return'.
    120120                /// </summary>
    121                 [Name(false)]
     121                [Convention(Notation.PascalCase)]
    122122                public static int INPUT_VALUE = 1;
    123123
     
    125125                /// ENUM for a left-facing value output.  E.g. 'random fraction'.
    126126                /// </summary>
    127                 [Name(false)]
     127                [Convention(Notation.PascalCase)]
    128128                public static int OUTPUT_VALUE = 2;
    129129
     
    131131                /// ENUM for a down-facing block stack.  E.g. 'if-do' or 'else'.
    132132                /// </summary>
    133                 [Name(false)]
     133                [Convention(Notation.PascalCase)]
    134134                public static int NEXT_STATEMENT = 3;
    135135
     
    137137                /// ENUM for an up-facing block stack.  E.g. 'break out of loop'.
    138138                /// </summary>
    139                 [Name(false)]
     139                [Convention(Notation.PascalCase)]
    140140                public static int PREVIOUS_STATEMENT = 4;
    141141
     
    143143                /// ENUM for an dummy input.  Used to add field(s) with no input.
    144144                /// </summary>
    145                 [Name(false)]
     145                [Convention(Notation.PascalCase)]
    146146                public static int DUMMY_INPUT = 5;
    147147
     
    149149                /// ENUM for left alignment.
    150150                /// </summary>
    151                 [Name(false)]
     151                [Convention(Notation.PascalCase)]
    152152                public static int ALIGN_LEFT = -1;
    153153
     
    155155                /// ENUM for centre alignment.
    156156                /// </summary>
    157                 [Name(false)]
     157                [Convention(Notation.PascalCase)]
    158158                public static int ALIGN_CENTRE = 0;
    159159
     
    161161                /// ENUM for right alignment.
    162162                /// </summary>
    163                 [Name(false)]
     163                [Convention(Notation.PascalCase)]
    164164                public static int ALIGN_RIGHT = 1;
    165165
     
    167167                /// ENUM for no drag operation.
    168168                /// </summary>
    169                 [Name(false)]
     169                [Convention(Notation.PascalCase)]
    170170                public static int DRAG_NONE = 0;
    171171
     
    173173                /// ENUM for inside the sticky DRAG_RADIUS.
    174174                /// </summary>
    175                 [Name(false)]
     175                [Convention(Notation.PascalCase)]
    176176                public static int DRAG_STICKY = 1;
    177177
     
    180180                /// clicks and drags.
    181181                /// </summary>
    182                 [Name(false)]
     182                [Convention(Notation.PascalCase)]
    183183                public static int DRAG_BEGIN = 1;
    184184
     
    186186                /// ENUM for freely draggable (outside the DRAG_RADIUS, if one applies).
    187187                /// </summary>
    188                 [Name(false)]
     188                [Convention(Notation.PascalCase)]
    189189                public static int DRAG_FREE = 2;
    190190
     
    192192                /// Lookup table for determining the opposite type of a connection.
    193193                /// </summary>
    194                 [Name(false)]
     194                [Convention(Notation.PascalCase)]
    195195                public static int[] OPPOSITE_TYPE = {
    196196                        0,
     
    204204                /// ENUM for toolbox and flyout at top of screen.
    205205                /// </summary>
    206                 [Name(false)]
     206                [Convention(Notation.PascalCase)]
    207207                public static int TOOLBOX_AT_TOP = 0;
    208208
     
    210210                /// ENUM for toolbox and flyout at bottom of screen.
    211211                /// </summary>
    212                 [Name(false)]
     212                [Convention(Notation.PascalCase)]
    213213                public static int TOOLBOX_AT_BOTTOM = 1;
    214214
     
    216216                /// ENUM for toolbox and flyout at left of screen.
    217217                /// </summary>
    218                 [Name(false)]
     218                [Convention(Notation.PascalCase)]
    219219                public static int TOOLBOX_AT_LEFT = 2;
    220220
     
    222222                /// ENUM for toolbox and flyout at right of screen.
    223223                /// </summary>
    224                 [Name(false)]
     224                [Convention(Notation.PascalCase)]
    225225                public static int TOOLBOX_AT_RIGHT = 3;
    226226
     
    236236                public static Block selected;
    237237
    238                 [Name(false)]
     238                [Convention(Notation.PascalCase)]
    239239                public static Blocks Blocks;
    240240
     
    14851485        public class BlockSvg : Block
    14861486        {
    1487                 [Name(false)]
     1487                [Convention(Notation.PascalCase)]
    14881488                public int TAB_HEIGHT = 20;
    14891489
     
    17391739                /// Non-breaking space.
    17401740                /// </summary>
    1741                 [Name(false)]
     1741                [Convention(Notation.PascalCase)]
    17421742                public const string NBSP = "\u00A0";
    17431743
     
    17451745                /// Editable fields are saved by the XML renderer, non-editable fields are not.
    17461746                /// </summary>
    1747                 [Name(false)]
     1747                [Convention(Notation.PascalCase)]
    17481748                public bool EDITABLE = true;
    17491749
  • EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Loops.cs

    r321 r425  
    345345                        var block = (Block)this;
    346346                        do {
    347                                 if (this.LOOP_TYPES.IndexOf(block.type) != -1) {
     347                                if (Array.IndexOf(this.LOOP_TYPES, block.type) != -1) {
    348348                                        legal = true;
    349349                                        break;
  • EcnlProtoTool/trunk/webapp/webmrbc/Blocks/Procedures.cs

    r321 r425  
    2828using Bridge;
    2929using Bridge.Html5;
    30 using Bridge.Text.RegularExpressions;
    3130
    3231namespace WebMrbc
     
    504503                public string validator_(string newVar)
    505504                {
    506                         newVar = newVar.Replace(new Regex("[\\s\\xa0]+", "g"), " ").Replace(new Regex("^ | $", "g"), "");
     505                        newVar = newVar.Replace(new RegExp("[\\s\\xa0]+", "g"), " ").Replace(new RegExp("^ | $", "g"), "");
    507506                        return newVar;
    508507                }
     
    630629                                        this.quarkConnections_[this.quarkIds_[i]] = connection;
    631630                                        if (mutatorOpen && connection != null &&
    632                                                 paramIds.IndexOf(this.quarkIds_[i]) == -1) {
     631                                                Array.IndexOf(paramIds, this.quarkIds_[i]) == -1) {
    633632                                                // This connection should no longer be attached to this block.
    634633                                                connection.disconnect();
     
    638637                        }
    639638                        // Rebuild the block's arguments.
    640                         this.arguments_ = (string[])(new string[0]).Concat(paramNames);
     639                        this.arguments_ = (new string[0]).Concat(paramNames).ToArray();
    641640                        this.updateShape_();
    642641                        this.quarkIds_ = paramIds;
     
    781780                        }
    782781                        if (e.type == Events.CREATE &&
    783                                 ((Create)e).ids.IndexOf(this.id) != -1) {
     782                                Array.IndexOf(((Create)e).ids, this.id) != -1) {
    784783                                // Look for the case where a procedure call was created (usually through
    785784                                // paste) and there is no matching definition.  In this case, create
     
    988987                        var block = (Block)this;
    989988                        do {
    990                                 if (this.FUNCTION_TYPES.IndexOf(block.type) != -1) {
     989                                if (Array.IndexOf(this.FUNCTION_TYPES, block.type) != -1) {
    991990                                        legal = true;
    992991                                        break;
  • EcnlProtoTool/trunk/webapp/webmrbc/Collection.cs

    r321 r425  
    3939using System.Collections.Generic;
    4040using Bridge;
    41 using Bridge.Linq;
    42 using Bridge.Text.RegularExpressions;
    4341using System.Collections;
     42using Bridge.Html5;
    4443
    4544namespace WebMrbc
     
    7675                internal void Remove(T item)
    7776                {
    78                         var i = List.IndexOf(item);
     77                        var i = Array.IndexOf(List, item);
    7978                        if (i >= 0)
    8079                                List.Splice(i, 1);
     
    9594                {
    9695                        List.Splice(0, List.Length);
    97                         List = (T[])List.Concat(n);
     96                        List = List.Concat(n).ToArray();
    9897
    9998                        if (OnReset != null)
     
    115114
    116115                        var max = 0;
    117                         var n = new Regex("^" + identifier + "([0-9]+)$");
     116                        var n = new RegExp("^" + identifier + "([0-9]+)$");
    118117                        foreach (var c in List) {
    119118                                var m = c.Identifier.Match(n);
  • EcnlProtoTool/trunk/webapp/webmrbc/EObjectModalView.cs

    r321 r425  
    298298                }
    299299
     300                [Convention(Notation.CamelCase)]
    300301                public void OnChangeIdentifier(Element ele)
    301302                {
     
    304305                }
    305306
     307                [Convention(Notation.CamelCase)]
    306308                public void OnSelectAttribute(Element sender, string attribute)
    307309                {
     
    310312                }
    311313
     314                [Convention(Notation.CamelCase)]
    312315                public void OnSelectClassGroupCode(jQueryMouseEvent e)
    313316                {
     
    318321                }
    319322
     323                [Convention(Notation.CamelCase)]
    320324                public void OnSelectClassCode(jQueryMouseEvent e)
    321325                {
     
    323327                }
    324328
     329                [Convention(Notation.CamelCase)]
    325330                public void OnChangeInstanceCode(Element sender)
    326331                {
     
    328333                }
    329334
     335                [Convention(Notation.CamelCase)]
    330336                public void OnOk(Element ele)
    331337                {
     
    384390                }
    385391
     392                [Convention(Notation.CamelCase)]
    386393                public void OnCancel(Element ele)
    387394                {
  • EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/CodeGenerator.cs

    r321 r425  
    4040using System.Text;
    4141using Bridge;
    42 using Bridge.Text.RegularExpressions;
     42using Bridge.Html5;
    4343
    4444namespace WebMrbc
     
    6161                                result = result.Substring(0, result.Length - 4);
    6262
    63                         if (!new Regex("^[A-Z][A-Za-z0-9_]+$").Test(result)) {
     63                        if (!new RegExp("^[A-Z][A-Za-z0-9_]+$").Test(result)) {
    6464                                result = String.Format("Cls{0:X2}{1:X2}", cls.classGroup.classGroupCode, cls.classCode);
    6565                        }
     
    7474                        string result = fi.identifier;
    7575
    76                         if (!new Regex("^[A-Za-z_][A-Za-z0-9_]+$").Test(result)) {
     76                        if (!new RegExp("^[A-Za-z_][A-Za-z0-9_]+$").Test(result)) {
    7777                                result = String.Format("property{0:X2}", pi.propertyCode);
    7878                        }
    7979                        else {
    80                                 var reg = new Regex("[A-Z][a-z]+", "g");
     80                                var reg = new RegExp("[A-Z][a-z]+", "g");
    8181                                string[] m;
    8282                                if ((m = reg.Exec(result)) != null) {
  • EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/EObjectBlock.cs

    r321 r425  
    4040using System.Text;
    4141using Bridge;
    42 using Bridge.Linq;
    4342using Bridge.Html5;
    4443
  • EcnlProtoTool/trunk/webapp/webmrbc/Ecnl/ValueRange.cs

    r321 r425  
    4040using System.Collections.Generic;
    4141using Bridge;
    42 using Bridge.Text.RegularExpressions;
     42using Bridge.Html5;
    4343
    4444namespace WebMrbc
     
    412412                        int pos = 0;
    413413                        while (pos < input.Length) {
    414                                 Regex ms;
     414                                RegExp ms;
    415415                                string[] m;
    416                                 if ((m = (ms = new Regex(TokenInfo.HexValue)).Exec(input.Substring(pos))) != null) {
     416                                if ((m = (ms = new RegExp(TokenInfo.HexValue)).Exec(input.Substring(pos))) != null) {
    417417                                        tokens.Push(new TokenInfo(m[0], TokenType.HexValue));
    418418                                        pos += m[0].Length;
    419419                                }
    420                                 else if ((m = (ms = new Regex(TokenInfo.Numeric)).Exec(input.Substring(pos))) != null) {
     420                                else if ((m = (ms = new RegExp(TokenInfo.Numeric)).Exec(input.Substring(pos))) != null) {
    421421                                        tokens.Push(new TokenInfo(m[0], TokenType.Numeric));
    422422                                        pos += m[0].Length;
    423423                                }
    424424                                else {
    425                                         if ((m = (ms = new Regex(TokenInfo.Separetor)).Exec(input.Substring(pos))) == null) {
     425                                        if ((m = (ms = new RegExp(TokenInfo.Separetor)).Exec(input.Substring(pos))) == null) {
    426426                                                tokens.Push(new TokenInfo(input.Substring(pos), TokenType.String));
    427427                                                break;
     
    747747
    748748                        if (emti.primitive) {
    749                                 string[] lines = valrng.Split(new Regex("\r\n"));
     749                                string[] lines = valrng.Split(new RegExp("\r\n"));
    750750                                foreach (string line in lines) {
    751                                         if (new Regex("^<(.+)>$").Test(line))
     751                                        if (new RegExp("^<(.+)>$").Test(line))
    752752                                                continue;
    753753
     
    773773                                        }
    774774
    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();
    777777                                        if (bitField != null)
    778778                                                valueRange._BitFields.Push(bitField);
  • EcnlProtoTool/trunk/webapp/webmrbc/Generator.cs

    r321 r425  
    3030using System.Runtime.InteropServices;
    3131using Bridge;
    32 using Bridge.Text.RegularExpressions;
     32using Bridge.Html5;
    3333
    3434namespace WebMrbc
     
    4747                        this.name_ = name;
    4848                        this.FUNCTION_NAME_PLACEHOLDER_REGEXP_ =
    49                                 new Regex(this.FUNCTION_NAME_PLACEHOLDER_, "g");
     49                                new RegExp(this.FUNCTION_NAME_PLACEHOLDER_, "g");
    5050                }
    5151
     
    120120                                                line = this.scrubNakedValue(line);
    121121                                        }
    122                                         nodes = (node[])nodes.Concat(line);
     122                                        nodes = nodes.Concat(line).ToArray();
    123123                                }
    124124                        }
     
    137137                public string prefixLines(string text, string prefix)
    138138                {
    139                         return prefix + text.Replace(new Regex("(?!\n$)\n"), "\n" + prefix);
     139                        return prefix + text.Replace(new RegExp("(?!\n$)\n"), "\n" + prefix);
    140140                }
    141141
     
    271271                /// </summary>
    272272                public string FUNCTION_NAME_PLACEHOLDER_ = "{leCUI8hutHZI4480Dc}";
    273                 public Regex FUNCTION_NAME_PLACEHOLDER_REGEXP_;
     273                public RegExp FUNCTION_NAME_PLACEHOLDER_REGEXP_;
    274274        }
    275275}
  • EcnlProtoTool/trunk/webapp/webmrbc/MainMenuView.cs

    r321 r425  
    4343using Bridge.Html5;
    4444using Bridge.jQuery2;
    45 using Bridge.Text.RegularExpressions;
    4645
    4746namespace WebMrbc
     
    120119
    121120                        if (String.IsNullOrEmpty(outfile) && (i + 1 < rubyfiles.Length))
    122                                 outfile = rubyfiles[i + 1].Replace(new Regex(".rb$", "g"), ext.StartsWith(".") ? ext : ("." + ext));
     121                                outfile = rubyfiles[i + 1].Replace(new RegExp(".rb$", "g"), ext.StartsWith(".") ? ext : ("." + ext));
    123122                        rubyfiles[i] = outfile;
    124123                }
  • EcnlProtoTool/trunk/webapp/webmrbc/MrbAstNodes.cs

    r321 r425  
    563563                        : base(p, node_type.NODE_SCOPE)
    564564                {
    565                         _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
     565                        _local_variables = _local_variables.Concat(p.locals_node()).ToArray();
    566566                        _body = body;
    567567                }
     
    615615                        : base(p, node_type.NODE_BEGIN)
    616616                {
    617                         _progs = (node[])_progs.Concat(progs);
     617                        _progs = _progs.Concat(progs).ToArray();
    618618                }
    619619
     
    14651465                {
    14661466                        _arg = a;
    1467                         _when = (when_t[])_when.Concat(b);
     1467                        _when = _when.Concat(b).ToArray();
    14681468                }
    14691469
     
    16581658                        _method = b;
    16591659                        if (args != null)
    1660                                 _args = (node[])_args.Concat(args);
     1660                                _args = _args.Concat(args).ToArray();
    16611661                        _block = block;
    16621662                }
     
    19131913                        _method = b;
    19141914                        if (args != null)
    1915                                 _args = (node[])_args.Concat(args);
     1915                                _args = _args.Concat(args).ToArray();
    19161916                        _block = block;
    19171917                }
     
    20292029                        : base(p, node_type.NODE_SUPER)
    20302030                {
    2031                         _args = (node[])_args.Concat(args);
     2031                        _args = _args.Concat(args).ToArray();
    20322032                }
    20332033
     
    26632663                        : base(p, node_type.NODE_ARRAY)
    26642664                {
    2665                         _array = (node[])_array.Concat(a);
     2665                        _array = _array.Concat(a).ToArray();
    26662666                        _item_per_line = item_per_line;
    26672667                }
     
    27942794                        : base(p, node_type.NODE_HASH)
    27952795                {
    2796                         _kvs = (kv_t[])_kvs.Concat(items);
     2796                        _kvs = _kvs.Concat(items).ToArray();
    27972797                }
    27982798
     
    33473347                {
    33483348                        _name = m;
    3349                         _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
     3349                        _local_variables = _local_variables.Concat(p.locals_node()).ToArray();
    33503350                        if (a != null) {
    33513351                                node n = a;
     
    33883388                {
    33893389                        _name = m;
    3390                         _mandatory_args = (arg_node[])_mandatory_args.Concat(a);
     3390                        _mandatory_args = _mandatory_args.Concat(a).ToArray();
    33913391                        _body = b;
    33923392                }
     
    36773677                        : base(p, node_type.NODE_BLOCK)
    36783678                {
    3679                         _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
     3679                        _local_variables = _local_variables.Concat(p.locals_node()).ToArray();
    36803680                        if (args != null) {
    36813681                                node n = args;
     
    37183718                        : base(p, node_type.NODE_BLOCK)
    37193719                {
    3720                         _mandatory_args = (node[])_mandatory_args.Concat(args);
     3720                        _mandatory_args = _mandatory_args.Concat(args).ToArray();
    37213721                        _body = body;
    37223722                        if (_body is ensure_node) {
     
    38153815                        : base(p, node_type.NODE_LAMBDA)
    38163816                {
    3817                         _local_variables = (mrb_sym[])_local_variables.Concat(p.locals_node());
     3817                        _local_variables = _local_variables.Concat(p.locals_node()).ToArray();
    38183818                        if (a != null) {
    38193819                                node n = a;
  • EcnlProtoTool/trunk/webapp/webmrbc/MrbScanner.cs

    r321 r425  
    342342                        if (utf32 >= 0x10000) {
    343343                                var ch = utf32 - 0x10000;
    344                                 str += String.FromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
     344                                str += StringPrototype.FromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
    345345                        }
    346346                        else {
    347                                 str += String.FromCharCode(utf32);
     347                                str += StringPrototype.FromCharCode(utf32);
    348348                        }
    349349                        return str;
     
    506506                private mrb_sym get_sym(string str)
    507507                {
    508                         int i = syms.IndexOf(str);
     508                        int i = Array.IndexOf(syms, str);
    509509                        if (i < 0) {
    510510                                i = syms.Length;
  • EcnlProtoTool/trunk/webapp/webmrbc/Mruby.cs

    r321 r425  
    4040using Bridge;
    4141using Bridge.Html5;
    42 using Bridge.Text.RegularExpressions;
    4342
    4443namespace WebMrbc
     
    141140                        var progressElement = (HTMLProgressElement)Document.GetElementById("progress");
    142141                        var spinnerElement = (HTMLDivElement)Document.GetElementById("spinner");
    143                         var m = text.Match(new Regex(@"([^(]+)\((\d+(\.\d+)?)\/(\d+)\)"));
     142                        var m = text.Match(new RegExp(@"([^(]+)\((\d+(\.\d+)?)\/(\d+)\)"));
    144143                        var now = DateTime.Now.Ticks;
    145144                        if (m != null && now - DateTime.Now.Ticks < 30) return; // if this is a progress update, skip it if too soon
     
    170169                }
    171170
    172                 [External, Name(false)]
     171                [External, Convention(Notation.PascalCase)]
    173172                internal string UTF8ArrayToString(Uint8Array buf, int index)
    174173                {
     
    194193                }
    195194
    196                 [Name(false)]
     195                [Convention(Notation.PascalCase)]
    197196                internal Uint8Array UTF8StringToArray(string str)
    198197                {
  • EcnlProtoTool/trunk/webapp/webmrbc/Names.cs

    r321 r425  
    2525using System.Runtime.InteropServices;
    2626using Bridge;
    27 using Bridge.Text.RegularExpressions;
     27using Bridge.Html5;
    2828
    2929namespace WebMrbc
     
    9191                        }
    9292                        var safeName = this.getDistinctName(name, type);
    93                         this.db_[normalized] = safeName.Substr(prefix.Length);
     93                        this.db_[normalized] = safeName.Substring(prefix.Length);
    9494                        return safeName;
    9595                }
     
    137137                                // Unfortunately names in non-latin characters will look like
    138138                                // _E9_9F_B3_E4_B9_90 which is pretty meaningless.
    139                                 name = Script.EncodeURI(name.Replace(new Regex(" "), "_").Replace(new Regex(@"[^\w]"), "_"));
     139                                name = Script.EncodeURI(name.Replace(new RegExp(" "), "_").Replace(new RegExp(@"[^\w]"), "_"));
    140140                                // Most languages don't allow names with leading numbers.
    141141                                if ("0123456789".IndexOf(name[0]) != -1) {
  • EcnlProtoTool/trunk/webapp/webmrbc/Procedures.cs

    r321 r425  
    2828using Bridge;
    2929using Bridge.Html5;
    30 using Bridge.Text.RegularExpressions;
    3130using WebMrbc;
    3231
     
    103102                        while (!isLegalName_(name, block.workspace, block)) {
    104103                                // Collision with another procedure.
    105                                 var r = new Regex(@"^(.*?)(\d+)$").Exec(name);
     104                                var r = new RegExp(@"^(.*?)(\d+)$").Exec(name);
    106105                                if (r == null) {
    107106                                        name += "2";
     
    152151                {
    153152                        // Strip leading and trailing whitespace.  Beyond this, all names are legal.
    154                         name = name.Replace(new Regex(@"^[\s\xa0] +|[\s\xa0] +$"), "");
     153                        name = name.Replace(new RegExp(@"^[\s\xa0] +|[\s\xa0] +$"), "");
    155154
    156155                        // Ensure two identically-named procedures don't exist.
  • EcnlProtoTool/trunk/webapp/webmrbc/Ruby.cs

    r321 r425  
    66using System.Linq;
    77using Bridge;
    8 using Bridge.Text.RegularExpressions;
    98using System.Collections.Generic;
    109using System.Runtime.InteropServices;
     
    115114                        if (nextCode == null)
    116115                                return code;
    117                         return (node[])code.Concat(nextCode);
     116                        return code.Concat(nextCode).ToArray();
    118117                }
    119118
     
    126125                private mrb_sym get_sym(string str)
    127126                {
    128                         int i = syms.IndexOf(str);
     127                        int i = Array.IndexOf(syms, str);
    129128                        if (i < 0) {
    130129                                i = syms.Length;
     
    149148                mrb_sym get_var_name(string str)
    150149                {
    151                         int i = syms.IndexOf(str);
     150                        int i = Array.IndexOf(syms, str);
    152151
    153152                        // ローカル変数なら登録されているはずなので、
  • EcnlProtoTool/trunk/webapp/webmrbc/Variables.cs

    r321 r425  
    2828using Bridge;
    2929using Bridge.Html5;
    30 using Bridge.Text.RegularExpressions;
    3130using WebMrbc;
    3231
     
    299298                                // Beyond this, all names are legal.
    300299                                if (newVar != null) {
    301                                         newVar = newVar.Replace(new Regex(@"[\s\xa0] +"), " ").Replace(new Regex("^ | $"), "");
     300                                        newVar = newVar.Replace(new RegExp(@"[\s\xa0] +"), " ").Replace(new RegExp("^ | $"), "");
    302301                                        if (newVar == Msg.RENAME_VARIABLE ||
    303302                                                newVar == Msg.NEW_VARIABLE) {
  • EcnlProtoTool/trunk/webapp/webmrbc/packages.config

    r270 r425  
    11<?xml version="1.0" encoding="utf-8"?>
    22<packages>
    3   <package id="Bridge" version="15.7.0" targetFramework="net45" />
    4   <package id="Bridge.Bootstrap" version="3.9.4" targetFramework="net45" />
    5   <package id="Bridge.Core" version="15.7.0" targetFramework="net45" />
    6   <package id="Bridge.Html5" version="15.7.0" targetFramework="net45" />
    7   <package id="Bridge.jQuery" version="2.9.3" targetFramework="net45" />
    8   <package id="Bridge.Min" version="15.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" />
    1010</packages>
  • EcnlProtoTool/trunk/webapp/webmrbc/webmrbc.csproj

    r273 r425  
    2323    <NuGetPackageImportStamp>
    2424    </NuGetPackageImportStamp>
     25    <Use64BitIISExpress />
    2526  </PropertyGroup>
    2627  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    4344    <NoStdLib>true</NoStdLib>
    4445  </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>
    6746  <ItemGroup>
    6847    <Content Include="ace\ace.js" />
     
    8968    <Content Include="xterm\src\xterm.css" />
    9069    <Content Include="xterm\src\xterm.js" />
    91     <Content Include="packages.config" />
    9270    <Content Include="Bridge\bridge.json" />
    9371    <Content Include="bootstrap\fonts\glyphicons-halflings-regular.eot" />
     
    9775    <Content Include="echonet_objects.json" />
    9876    <Content Include="information.json" />
     77    <Content Include="bridge.json" />
     78    <None Include="packages.config" />
    9979    <None Include="Web.Debug.config">
    10080      <DependentUpon>Web.config</DependentUpon>
     
    171151    <Compile Include="XTerm.cs" />
    172152  </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>
    173170  <PropertyGroup>
    174171    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
     
    196193    </VisualStudio>
    197194  </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)
     197call 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')" />
    199200  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    200201    <PropertyGroup>
    201202      <ErrorText>このプロジェクトは、このコンピューター上にない NuGet パッケージを参照しています。それらのパッケージをダウンロードするには、[NuGet パッケージの復元] を使用します。詳細については、http://go.microsoft.com/fwlink/?LinkID=322105 を参照してください。見つからないファイルは {0} です。</ErrorText>
    202203    </PropertyGroup>
    203     <Error Condition="!Exists('..\packages\Bridge.Min.15.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'))" />
    204205  </Target>
    205   <PropertyGroup>
    206     <PostBuildEvent>cd $(ProjectDir)
    207 call copy.bat</PostBuildEvent>
    208   </PropertyGroup>
    209206  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    210207       Other similar extension points exist, see Microsoft.Common.targets.
Note: See TracChangeset for help on using the changeset viewer.