Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Неявное подключение пространств имён #25

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Interpreter.Lib/BackEnd/Instructions/AsString.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Serialization;
using Interpreter.Lib.BackEnd.Values;
using SystemType = System.Type;

namespace Interpreter.Lib.BackEnd.Instructions
{
Expand Down Expand Up @@ -37,7 +37,7 @@ public override int Execute(VirtualMachine vm)
private class DoubleValueWriteConverter : JsonConverter<double>
{
public override double Read(ref Utf8JsonReader reader,
Type typeToConvert, JsonSerializerOptions options) =>
SystemType typeToConvert, JsonSerializerOptions options) =>
throw new NotImplementedException();

public override void Write(Utf8JsonWriter writer,
Expand Down
3 changes: 0 additions & 3 deletions Interpreter.Lib/BackEnd/Instructions/CallFunction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace Interpreter.Lib.BackEnd.Instructions
{
public class CallFunction : Simple
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/BackEnd/Instructions/CreateArray.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Linq;

namespace Interpreter.Lib.BackEnd.Instructions
{
public class CreateArray : Instruction
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/BackEnd/Instructions/CreateObject.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace Interpreter.Lib.BackEnd.Instructions
{
public class CreateObject : Instruction
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/BackEnd/Instructions/DotAssignment.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Values;

namespace Interpreter.Lib.BackEnd.Instructions
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/BackEnd/Instructions/IfNotGoto.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Interpreter.Lib.BackEnd.Values;

namespace Interpreter.Lib.BackEnd.Instructions
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/BackEnd/Instructions/IndexAssignment.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Values;

namespace Interpreter.Lib.BackEnd.Instructions
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/BackEnd/Instructions/Instruction.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace Interpreter.Lib.BackEnd.Instructions
{
public abstract class Instruction : IComparable<Instruction>
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/BackEnd/Instructions/RemoveFromArray.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Values;

namespace Interpreter.Lib.BackEnd.Instructions
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/BackEnd/Instructions/Return.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Values;

namespace Interpreter.Lib.BackEnd.Instructions
Expand Down
3 changes: 0 additions & 3 deletions Interpreter.Lib/BackEnd/Instructions/Simple.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Values;

namespace Interpreter.Lib.BackEnd.Instructions
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/BackEnd/Values/IValue.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace Interpreter.Lib.BackEnd.Values
{
public interface IValue : IEquatable<IValue>
Expand Down
4 changes: 0 additions & 4 deletions Interpreter.Lib/BackEnd/VirtualMachine.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;

namespace Interpreter.Lib.BackEnd
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/FrontEnd/GetTokens/Data/Structure.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes;
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/FrontEnd/GetTokens/Data/Token.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes;
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/FrontEnd/GetTokens/ILexer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.FrontEnd.GetTokens.Data;

namespace Interpreter.Lib.FrontEnd.GetTokens
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/FrontEnd/GetTokens/Impl/Lexer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text.RegularExpressions;
using Interpreter.Lib.FrontEnd.GetTokens.Data;
using Interpreter.Lib.FrontEnd.GetTokens.Data.TokenTypes;
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/FrontEnd/GetTokens/LexerException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Interpreter.Lib.FrontEnd.GetTokens.Data;

namespace Interpreter.Lib.FrontEnd.GetTokens
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/FrontEnd/TopDownParse/Impl/Parser.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Interpreter.Lib.FrontEnd.GetTokens;
using Interpreter.Lib.FrontEnd.GetTokens.Data;
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/FrontEnd/TopDownParse/Impl/TokensStream.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using Interpreter.Lib.FrontEnd.GetTokens.Data;

namespace Interpreter.Lib.FrontEnd.TopDownParse.Impl
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/FrontEnd/TopDownParse/ParserException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Interpreter.Lib.FrontEnd.GetTokens.Data;

namespace Interpreter.Lib.FrontEnd.TopDownParse
Expand Down
3 changes: 3 additions & 0 deletions Interpreter.Lib/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Global using directives

global using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;
1 change: 0 additions & 1 deletion Interpreter.Lib/IR/Ast/IAbstractSyntaxTree.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;

namespace Interpreter.Lib.IR.Ast
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Impl/AbstractSyntaxTree.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.IR.Ast.Nodes;
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/AbstractSyntaxTreeNode.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.FrontEnd.GetTokens.Data;
using Interpreter.Lib.IR.Ast.Nodes.Declarations;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Interpreter.Lib.IR.CheckSemantics.Variables;

namespace Interpreter.Lib.IR.Ast.Nodes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions;
using Interpreter.Lib.IR.Ast.Nodes.Statements;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.FrontEnd.GetTokens.Data;
using Interpreter.Lib.IR.Ast.Nodes.Expressions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
using Interpreter.Lib.IR.CheckSemantics.Types;

namespace Interpreter.Lib.IR.Ast.Nodes.Declarations
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Interpreter.Lib.IR.CheckSemantics.Types;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions
{
public abstract class AccessExpression : Expression
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Declarations;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Interpreter.Lib.IR.CheckSemantics.Variables.Symbols;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions
{
Expand Down
4 changes: 0 additions & 4 deletions Interpreter.Lib/IR/Ast/Nodes/Expressions/BinaryExpression.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions
{
Expand Down
4 changes: 0 additions & 4 deletions Interpreter.Lib/IR/Ast/Nodes/Expressions/CallExpression.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions;
Expand All @@ -9,7 +6,6 @@
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Interpreter.Lib.IR.CheckSemantics.Variables.Symbols;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions
{
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Expressions/CastAsExpression.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Declarations;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Expressions/Expression.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Expressions/MemberExpression.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Interpreter.Lib.IR.CheckSemantics.Variables.Symbols;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Variables.Symbols;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.FrontEnd.GetTokens.Data;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;

Expand Down
4 changes: 0 additions & 4 deletions Interpreter.Lib/IR/Ast/Nodes/Expressions/UnaryExpression.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.AccessExpressions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions.PrimaryExpressions;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;
using Type = Interpreter.Lib.IR.CheckSemantics.Types.Type;

namespace Interpreter.Lib.IR.Ast.Nodes.Expressions
{
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/ScriptBody.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;

namespace Interpreter.Lib.IR.Ast.Nodes
{
public class ScriptBody : AbstractSyntaxTreeNode
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Statements/BlockStatement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;

namespace Interpreter.Lib.IR.Ast.Nodes.Statements
Expand Down
1 change: 0 additions & 1 deletion Interpreter.Lib/IR/Ast/Nodes/Statements/BreakStatement.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;

namespace Interpreter.Lib.IR.Ast.Nodes.Statements
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;

namespace Interpreter.Lib.IR.Ast.Nodes.Statements
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.IR.Ast.Nodes.Expressions;

Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Statements/IfStatement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using Interpreter.Lib.IR.CheckSemantics.Exceptions;
using Interpreter.Lib.IR.CheckSemantics.Types;

namespace Interpreter.Lib.IR.Ast.Nodes.Statements
{
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Statements/ReturnStatement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Declarations;
Expand Down
3 changes: 0 additions & 3 deletions Interpreter.Lib/IR/Ast/Nodes/Statements/TypeStatement.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System.Collections.Generic;
using Interpreter.Lib.IR.CheckSemantics.Types;

namespace Interpreter.Lib.IR.Ast.Nodes.Statements
{
public class TypeStatement : Statement
Expand Down
2 changes: 0 additions & 2 deletions Interpreter.Lib/IR/Ast/Nodes/Statements/WhileStatement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Interpreter.Lib.BackEnd.Instructions;
using Interpreter.Lib.BackEnd.Values;
using Interpreter.Lib.IR.Ast.Nodes.Expressions;
Expand Down
Loading