diff --git a/Interpreter.Lib/BackEnd/Instructions/AsString.cs b/Interpreter.Lib/BackEnd/Instructions/AsString.cs index d8c9eb54..1161a7bd 100644 --- a/Interpreter.Lib/BackEnd/Instructions/AsString.cs +++ b/Interpreter.Lib/BackEnd/Instructions/AsString.cs @@ -1,9 +1,8 @@ using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Text.Json; +using System.Text.Json.Serialization; using Interpreter.Lib.BackEnd.Values; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; namespace Interpreter.Lib.BackEnd.Instructions { @@ -17,18 +16,15 @@ public AsString(string left, IValue right, int number) : public override int Execute(VirtualMachine vm) { var frame = vm.Frames.Peek(); - frame[Left] = JsonConvert.SerializeObject( + frame[Left] = JsonSerializer.Serialize( right.right.Get(frame), - new JsonSerializerSettings + new JsonSerializerOptions { - Formatting = Formatting.Indented, - FloatFormatHandling = FloatFormatHandling.Symbol, - ReferenceLoopHandling = ReferenceLoopHandling.Ignore, - ContractResolver = new CamelCasePropertyNamesContractResolver(), - Converters = new List - { - new DoubleValueConverter() - } + WriteIndented = true, + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + ReferenceHandler = ReferenceHandler.IgnoreCycles, + Converters = { new DoubleValueWriteConverter() }, + NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals } ); @@ -38,20 +34,21 @@ public override int Execute(VirtualMachine vm) protected override string ToStringRepresentation() => $"{Left} = {right.right} as string"; [ExcludeFromCodeCoverage] - private class DoubleValueConverter : JsonConverter + private class DoubleValueWriteConverter : JsonConverter { - public override bool CanRead => false; + public override double Read(ref Utf8JsonReader reader, + Type typeToConvert, JsonSerializerOptions options) => + throw new NotImplementedException(); - public override void WriteJson(JsonWriter writer, double value, JsonSerializer serializer) => + public override void Write(Utf8JsonWriter writer, + double value, JsonSerializerOptions options) + { // ReSharper disable once CompareOfFloatsByEqualityOperator - writer.WriteRawValue(value == Math.Truncate(value) - ? JsonConvert.ToString(Convert.ToInt64(value)) - : JsonConvert.ToString(value)); - - public override double ReadJson(JsonReader reader, Type objectType, - double existingValue, bool hasExistingValue, - JsonSerializer serializer) => - throw new NotImplementedException("CanRead is false, so reading is unnecessary"); + if (value == Math.Truncate(value)) + writer.WriteNumberValue(Convert.ToInt64(value)); + else + writer.WriteNumberValue(value); + } } } } \ No newline at end of file diff --git a/Interpreter.Lib/FrontEnd/GetTokens/Data/Token.cs b/Interpreter.Lib/FrontEnd/GetTokens/Data/Token.cs index 51fabb34..43fd4ed6 100644 --- a/Interpreter.Lib/FrontEnd/GetTokens/Data/Token.cs +++ b/Interpreter.Lib/FrontEnd/GetTokens/Data/Token.cs @@ -20,7 +20,7 @@ public override string ToString() { var displayValue = Value; if (displayValue != null) displayValue = Regex.Replace(Value, "\"", "\\\""); - if (Type.WhiteSpace()) displayValue = ""; + if (Type.CanIgnore()) displayValue = ""; return $"{Type} {Segment}: {displayValue}"; } } diff --git a/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/IgnorableType.cs b/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/IgnorableType.cs new file mode 100644 index 00000000..16d595e4 --- /dev/null +++ b/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/IgnorableType.cs @@ -0,0 +1,8 @@ +namespace Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes +{ + public record IgnorableType(string Tag = null, string Pattern = null, int Priority = 0) + : TokenType(Tag, Pattern, Priority) + { + public override bool CanIgnore() => true; + } +} \ No newline at end of file diff --git a/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/TokenType.cs b/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/TokenType.cs index 70337d00..ff588cd3 100644 --- a/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/TokenType.cs +++ b/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/TokenType.cs @@ -2,11 +2,7 @@ { public record TokenType(string Tag, string Pattern, int Priority) { - public TokenType() : this(null, null, 0) - { - } - - public virtual bool WhiteSpace() => false; + public virtual bool CanIgnore() => false; public virtual bool EndOfProgram() => false; diff --git a/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/WhiteSpaceType.cs b/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/WhiteSpaceType.cs deleted file mode 100644 index 166fcc01..00000000 --- a/Interpreter.Lib/FrontEnd/GetTokens/Data/TokenTypes/WhiteSpaceType.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes -{ - public record WhiteSpaceType(string Tag = null, string Pattern = null, int Priority = 0) - : TokenType(Tag, Pattern, Priority) - { - public override bool WhiteSpace() => true; - } -} \ No newline at end of file diff --git a/Interpreter.Lib/FrontEnd/GetTokens/Impl/Lexer.cs b/Interpreter.Lib/FrontEnd/GetTokens/Impl/Lexer.cs index 6418f218..c699f452 100644 --- a/Interpreter.Lib/FrontEnd/GetTokens/Impl/Lexer.cs +++ b/Interpreter.Lib/FrontEnd/GetTokens/Impl/Lexer.cs @@ -33,7 +33,7 @@ public List GetTokens(string text) _lines.Add(match.Groups["NEWLINE"].Index); } - return this.Where(t => !t.Type.WhiteSpace()).ToList(); + return this.Where(t => !t.Type.CanIgnore()).ToList(); } public IEnumerator GetEnumerator() diff --git a/Interpreter.Lib/Interpreter.Lib.csproj b/Interpreter.Lib/Interpreter.Lib.csproj index 54610ed4..1fb6f596 100644 --- a/Interpreter.Lib/Interpreter.Lib.csproj +++ b/Interpreter.Lib/Interpreter.Lib.csproj @@ -5,7 +5,6 @@ - diff --git a/Interpreter.Tests/Stubs/MapperStub.cs b/Interpreter.Tests/Stubs/MapperStub.cs deleted file mode 100644 index ae5b8e1c..00000000 --- a/Interpreter.Tests/Stubs/MapperStub.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; -using AutoMapper; -using Interpreter.MappingProfiles; - -namespace Interpreter.Tests.Stubs -{ - public class MapperStub : Mapper - { - public MapperStub() : base(new MapperConfiguration( - x => x.AddProfiles(new List - { - new TokenTypeProfile(), - new StructureProfile() - }) - )) { } - } -} \ No newline at end of file diff --git a/Interpreter.Tests/Unit/FrontEnd/LexerTests.cs b/Interpreter.Tests/Unit/FrontEnd/LexerTests.cs index f65651b6..3d0cc052 100644 --- a/Interpreter.Tests/Unit/FrontEnd/LexerTests.cs +++ b/Interpreter.Tests/Unit/FrontEnd/LexerTests.cs @@ -1,9 +1,7 @@ using System.Linq; using Interpreter.Lib.FrontEnd.GetTokens; -using Interpreter.Lib.FrontEnd.GetTokens.Data; using Interpreter.Lib.FrontEnd.GetTokens.Impl; -using Interpreter.Models; -using Interpreter.Tests.Stubs; +using Interpreter.Services.Providers.Impl.StructureProvider; using Interpreter.Tests.TestData; using Xunit; @@ -15,8 +13,7 @@ public class LexerTests public LexerTests() { - var mapper = new MapperStub(); - _lexer = new Lexer(mapper.Map(new())); + _lexer = new Lexer(new StructureProvider().CreateStructure()); } [Theory] @@ -41,5 +38,15 @@ public void LexerToStringCorrectTest() [Fact] public void EmptyTextTest() => Assert.NotEmpty(_lexer.GetTokens("")); + + [Fact] + public void GetTokensSkipIgnorableTypesTest() + { + const string text = @" + let x = 1 // int + "; + var tokens = _lexer.GetTokens(text); + Assert.DoesNotContain(_lexer.Structure.FindByTag("Comment"), tokens.Select(x => x.Type)); + } } } \ No newline at end of file diff --git a/Interpreter.Tests/Unit/FrontEnd/ParserTests.cs b/Interpreter.Tests/Unit/FrontEnd/ParserTests.cs index 13601e51..4700d075 100644 --- a/Interpreter.Tests/Unit/FrontEnd/ParserTests.cs +++ b/Interpreter.Tests/Unit/FrontEnd/ParserTests.cs @@ -1,9 +1,7 @@ -using Interpreter.Lib.FrontEnd.GetTokens.Data; using Interpreter.Lib.FrontEnd.GetTokens.Impl; using Interpreter.Lib.FrontEnd.TopDownParse; using Interpreter.Lib.FrontEnd.TopDownParse.Impl; -using Interpreter.Models; -using Interpreter.Tests.Stubs; +using Interpreter.Services.Providers.Impl.StructureProvider; using Interpreter.Tests.TestData; using Xunit; @@ -15,10 +13,9 @@ public class ParserTests public ParserTests() { - var mapper = new MapperStub(); - _parser = new Parser(new Lexer( - mapper.Map(new()) + new StructureProvider() + .CreateStructure() )); } diff --git a/Interpreter.Tests/Unit/Infrastructure/ProvidersTests.cs b/Interpreter.Tests/Unit/Infrastructure/ProvidersTests.cs index 37664664..13fde978 100644 --- a/Interpreter.Tests/Unit/Infrastructure/ProvidersTests.cs +++ b/Interpreter.Tests/Unit/Infrastructure/ProvidersTests.cs @@ -1,11 +1,13 @@ using System; +using System.Collections.Generic; using Interpreter.Lib.FrontEnd.GetTokens; +using Interpreter.Lib.FrontEnd.GetTokens.Data; +using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes; using Interpreter.Lib.FrontEnd.GetTokens.Impl; using Interpreter.Lib.FrontEnd.TopDownParse.Impl; using Interpreter.Services.Providers; using Interpreter.Services.Providers.Impl.LexerProvider; using Interpreter.Services.Providers.Impl.ParserProvider; -using Interpreter.Tests.Stubs; using Microsoft.Extensions.Options; using Moq; using Xunit; @@ -19,6 +21,10 @@ public class ProvidersTests [InlineData(typeof(LoggingLexer), true)] public void CertainLexerProvidedTest(Type lexerType, bool dump) { + var structureProvider = new Mock(); + structureProvider.Setup(x => x.CreateStructure()) + .Returns(new Structure(new List())); + var options = new Mock>(); options.Setup(x => x.Value) .Returns(new CommandLineSettings @@ -27,7 +33,7 @@ public void CertainLexerProvidedTest(Type lexerType, bool dump) InputFilePath = "file.js" }); - var lexerProvider = new LexerProvider(new MapperStub(), options.Object); + var lexerProvider = new LexerProvider(structureProvider.Object, options.Object); var lexer = lexerProvider.CreateLexer(); Assert.IsType(lexerType, lexer); diff --git a/Interpreter/CommandLineSettings.cs b/Interpreter/CommandLineSettings.cs index d94f1c2c..33a0b842 100644 --- a/Interpreter/CommandLineSettings.cs +++ b/Interpreter/CommandLineSettings.cs @@ -3,7 +3,6 @@ using System.IO; using CommandLine; using CommandLine.Text; -using Interpreter.Models; namespace Interpreter { @@ -31,9 +30,8 @@ public static IEnumerable Examples } } - public string GetInputFileName() => InputFilePath.Split(".js")[0]; - - public StructureModel StructureModel { get; } = new(); + public string GetInputFileName() => + InputFilePath.Split(".js")[0]; public virtual string GetText() => File.ReadAllText(InputFilePath); diff --git a/Interpreter/Interpreter.csproj b/Interpreter/Interpreter.csproj index d2a6f5a5..abcb6341 100644 --- a/Interpreter/Interpreter.csproj +++ b/Interpreter/Interpreter.csproj @@ -3,7 +3,7 @@ Exe net6.0 - 1.1.3 + 1.1.4 @@ -11,10 +11,9 @@ - - + diff --git a/Interpreter/MappingProfiles/StructureProfile.cs b/Interpreter/MappingProfiles/StructureProfile.cs deleted file mode 100644 index 817f534c..00000000 --- a/Interpreter/MappingProfiles/StructureProfile.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections.Generic; -using AutoMapper; -using Interpreter.Lib.FrontEnd.GetTokens.Data; -using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes; -using Interpreter.Models; - -namespace Interpreter.MappingProfiles -{ - public class StructureProfile : Profile - { - public StructureProfile() - { - CreateMap() - .ConstructUsing((src, context) => - new Structure(context.Mapper - .Map, List> - (src.TokenTypes))); - } - } -} \ No newline at end of file diff --git a/Interpreter/MappingProfiles/TokenTypeProfile.cs b/Interpreter/MappingProfiles/TokenTypeProfile.cs deleted file mode 100644 index bc7022a9..00000000 --- a/Interpreter/MappingProfiles/TokenTypeProfile.cs +++ /dev/null @@ -1,18 +0,0 @@ -using AutoMapper; -using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes; -using Interpreter.Models; - -namespace Interpreter.MappingProfiles -{ - public class TokenTypeProfile : Profile - { - public TokenTypeProfile() - { - CreateMap() - .Include() - .ConstructUsing((src, _) => src.WhiteSpace ? new WhiteSpaceType() : new TokenType()); - - CreateMap(); - } - } -} \ No newline at end of file diff --git a/Interpreter/Models/StructureModel.cs b/Interpreter/Models/StructureModel.cs deleted file mode 100644 index b0dbe984..00000000 --- a/Interpreter/Models/StructureModel.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Newtonsoft.Json; - -namespace Interpreter.Models -{ - [ExcludeFromCodeCoverage] - public class StructureModel - { - public List TokenTypes { get; } - - public StructureModel() - { - TokenTypes = JsonConvert.DeserializeObject>( - Interpreter.TokenTypes.Json - ); - } - } -} \ No newline at end of file diff --git a/Interpreter/Models/TokenTypeModel.cs b/Interpreter/Models/TokenTypeModel.cs deleted file mode 100644 index 580e119b..00000000 --- a/Interpreter/Models/TokenTypeModel.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Diagnostics.CodeAnalysis; - -namespace Interpreter.Models -{ - // ReSharper disable once ClassNeverInstantiated.Global - [SuppressMessage("ReSharper", "UnusedMember.Global")] - [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")] - [ExcludeFromCodeCoverage] - public record TokenTypeModel - { - public string Tag { get; init; } - public string Pattern { get; init; } - public int Priority { get; init; } - public bool WhiteSpace { get; init; } - } -} \ No newline at end of file diff --git a/Interpreter/Program.cs b/Interpreter/Program.cs index 5e2baac3..83d5a12a 100644 --- a/Interpreter/Program.cs +++ b/Interpreter/Program.cs @@ -2,7 +2,6 @@ using System.Diagnostics.CodeAnalysis; using CommandLine; using Microsoft.Extensions.DependencyInjection; -using Interpreter.MappingProfiles; using Interpreter.Services.Executor; using Interpreter.Services.Executor.Impl; using Interpreter.Services.Parsing; @@ -10,6 +9,7 @@ using Interpreter.Services.Providers; using Interpreter.Services.Providers.Impl.LexerProvider; using Interpreter.Services.Providers.Impl.ParserProvider; +using Interpreter.Services.Providers.Impl.StructureProvider; using Microsoft.Extensions.Options; namespace Interpreter @@ -34,12 +34,11 @@ private static void Main(string[] args) => private static void ConfigureServices(CommandLineSettings settings) { + ServiceCollection.AddSingleton(); ServiceCollection.AddSingleton(); ServiceCollection.AddSingleton(); ServiceCollection.AddSingleton(); - ServiceCollection.AddAutoMapper(typeof(TokenTypeProfile), typeof(StructureProfile)); - ServiceCollection.AddSingleton(); ServiceCollection.AddSingleton(_ => Options.Create(settings)); diff --git a/Interpreter/Services/Providers/IStructureProvider.cs b/Interpreter/Services/Providers/IStructureProvider.cs new file mode 100644 index 00000000..a45b2a60 --- /dev/null +++ b/Interpreter/Services/Providers/IStructureProvider.cs @@ -0,0 +1,9 @@ +using Interpreter.Lib.FrontEnd.GetTokens.Data; + +namespace Interpreter.Services.Providers +{ + public interface IStructureProvider + { + Structure CreateStructure(); + } +} \ No newline at end of file diff --git a/Interpreter/Services/Providers/Impl/LexerProvider/LexerProvider.cs b/Interpreter/Services/Providers/Impl/LexerProvider/LexerProvider.cs index ce1a25db..b8fd2578 100644 --- a/Interpreter/Services/Providers/Impl/LexerProvider/LexerProvider.cs +++ b/Interpreter/Services/Providers/Impl/LexerProvider/LexerProvider.cs @@ -1,28 +1,25 @@ using System.IO.Abstractions; -using AutoMapper; using Interpreter.Lib.FrontEnd.GetTokens; -using Interpreter.Lib.FrontEnd.GetTokens.Data; using Interpreter.Lib.FrontEnd.GetTokens.Impl; -using Interpreter.Models; using Microsoft.Extensions.Options; namespace Interpreter.Services.Providers.Impl.LexerProvider { public class LexerProvider : ILexerProvider { - private readonly IMapper _mapper; + private readonly IStructureProvider _structureProvider; private readonly CommandLineSettings _settings; - public LexerProvider(IMapper mapper, IOptions options) + public LexerProvider(IStructureProvider structureProvider, IOptions options) { - _mapper = mapper; + _structureProvider = structureProvider; _settings = options.Value; } public ILexer CreateLexer() { - var domain = _mapper.Map(_settings.StructureModel); - var lexer = new Lexer(domain); + var structure = _structureProvider.CreateStructure(); + var lexer = new Lexer(structure); return _settings.Dump ? new LoggingLexer(lexer, _settings.GetInputFileName(), new FileSystem()) : lexer; diff --git a/Interpreter/Services/Providers/Impl/StructureProvider/StructureProvider.cs b/Interpreter/Services/Providers/Impl/StructureProvider/StructureProvider.cs new file mode 100644 index 00000000..83c06c78 --- /dev/null +++ b/Interpreter/Services/Providers/Impl/StructureProvider/StructureProvider.cs @@ -0,0 +1,49 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; +using Interpreter.Lib.FrontEnd.GetTokens.Data; +using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes; + +namespace Interpreter.Services.Providers.Impl.StructureProvider +{ + public class StructureProvider : IStructureProvider + { + public Structure CreateStructure() => + JsonSerializer.Deserialize( + TokenTypes.Json, + new JsonSerializerOptions + { + Converters = { new StructureReadConverter() } + }); + + [ExcludeFromCodeCoverage] + private class StructureReadConverter : JsonConverter + { + public override Structure Read(ref Utf8JsonReader reader, + Type typeToConvert, JsonSerializerOptions options) + { + using var jsonDocument = JsonDocument.ParseValue(ref reader); + var tokenTypes = jsonDocument.RootElement + .EnumerateArray().Select(element => + { + var tag = element.GetProperty("tag").GetString(); + var pattern = element.GetProperty("pattern").GetString(); + var priority = element.GetProperty("priority").GetInt32(); + + var ignorable = element.TryGetProperty("canIgnore", out var canIgnore); + + return ignorable && canIgnore.GetBoolean() + ? new IgnorableType(tag, pattern, priority) + : new TokenType(tag, pattern, priority); + }).ToList(); + return new Structure(tokenTypes); + } + + public override void Write(Utf8JsonWriter writer, + Structure value, JsonSerializerOptions options) => + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Interpreter/TokenTypes.cs b/Interpreter/TokenTypes.cs index ec2636f0..0f6d2ac0 100644 --- a/Interpreter/TokenTypes.cs +++ b/Interpreter/TokenTypes.cs @@ -7,133 +7,112 @@ public static class TokenTypes ""tag"": ""Comment"", ""pattern"": ""[\/]{2}.*"", ""priority"": 0, - ""whiteSpace"": true + ""canIgnore"": true }, { ""tag"": ""Ident"", ""pattern"": ""[a-zA-Z][a-zA-Z0-9]*"", - ""priority"": 50, - ""whiteSpace"": false + ""priority"": 50 }, { ""tag"": ""IntegerLiteral"", ""pattern"": ""[0-9]+"", - ""priority"": 3, - ""whiteSpace"": false + ""priority"": 3 }, { ""tag"": ""FloatLiteral"", ""pattern"": ""[0-9]+[.][0-9]+"", - ""priority"": 2, - ""whiteSpace"": false + ""priority"": 2 }, { ""tag"": ""NullLiteral"", ""pattern"": ""null"", - ""priority"": 4, - ""whiteSpace"": false + ""priority"": 4 }, { ""tag"": ""BooleanLiteral"", ""pattern"": ""true|false"", - ""priority"": 5, - ""whiteSpace"": false + ""priority"": 5 }, { ""tag"": ""StringLiteral"", ""pattern"": ""\\\""(\\\\.|[^\""\\\\])*\\\"""", - ""priority"": 6, - ""whiteSpace"": false + ""priority"": 6 }, { ""tag"": ""Keyword"", ""pattern"": ""let|const|function|if|else|while|break|continue|return|as|type"", - ""priority"": 11, - ""whiteSpace"": false + ""priority"": 11 }, { ""tag"": ""Operator"", ""pattern"": ""[+]{1,2}|[-]|[*]|[\/]|[%]|([!]|[=])[=]|([<]|[>])[=]?|[!]|[|]{2}|[&]{2}|[~]|[:]{2}"", - ""priority"": 12, - ""whiteSpace"": false + ""priority"": 12 }, { ""tag"": ""Arrow"", ""pattern"": ""[=][>]"", - ""priority"": 13, - ""whiteSpace"": false + ""priority"": 13 }, { ""tag"": ""Comma"", ""pattern"": ""[,]"", - ""priority"": 100, - ""whiteSpace"": false + ""priority"": 100 }, { ""tag"": ""Dot"", ""pattern"": ""[.]"", - ""priority"": 105, - ""whiteSpace"": false + ""priority"": 105 }, { ""tag"": ""LeftCurl"", ""pattern"": ""[{]"", - ""priority"": 101, - ""whiteSpace"": false + ""priority"": 101 }, { ""tag"": ""RightCurl"", ""pattern"": ""[}]"", - ""priority"": 102, - ""whiteSpace"": false + ""priority"": 102 }, { ""tag"": ""LeftParen"", ""pattern"": ""[(]"", - ""priority"": 103, - ""whiteSpace"": false + ""priority"": 103 }, { ""tag"": ""RightParen"", ""pattern"": ""[)]"", - ""priority"": 104, - ""whiteSpace"": false + ""priority"": 104 }, { ""tag"": ""LeftBracket"", ""pattern"": ""[[]"", - ""priority"": 107, - ""whiteSpace"": false + ""priority"": 107 }, { ""tag"": ""RightBracket"", ""pattern"": ""[]]"", - ""priority"": 109, - ""whiteSpace"": false + ""priority"": 109 }, { ""tag"": ""Assign"", ""pattern"": ""[=]"", - ""priority"": 99, - ""whiteSpace"": false + ""priority"": 99 }, { ""tag"": ""QuestionMark"", ""pattern"": ""[?]"", - ""priority"": 90, - ""whiteSpace"": false + ""priority"": 90 }, { ""tag"": ""Colon"", ""pattern"": ""[:]"", - ""priority"": 91, - ""whiteSpace"": false + ""priority"": 91 }, { ""tag"": ""SemiColon"", ""pattern"": ""[;]"", - ""priority"": 92, - ""whiteSpace"": false + ""priority"": 92 } ]"; } diff --git a/Readme.md b/Readme.md index 0dd0455c..72cdb2ed 100644 --- a/Readme.md +++ b/Readme.md @@ -174,7 +174,7 @@ let s = v2d as string ### Запуск ``` -Interpreter 1.1.3 +Interpreter 1.1.4 Copyright (C) 2022 Interpreter USAGE: Simple interpretation call: