- Некорректная обработка чисел больше размерности
int
. Например,9999999999999999999=-1981284353
. IndexOutOfRangeException
в случае пустого ввода и в случае если оператор умножения или сложения находятся в начале:+2
,*2
.- Программа не покрыта тестами.
- Дублирование логики в
switch - case
. Символьный тип элементарно перевести в число, а блок с проверкой от'0'
до'9'
заменяется одной строчкой. То же самое относится к операторам'*'
и'+'
.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
class Animal | |
{ | |
} | |
class Cat : Animal | |
{ | |
public void Meow() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chcp 65001 | |
mkdir Kochurkins | |
cd Kochurkins | |
git init | |
git checkout --orphan @I36@ | |
git commit -m "Татьяна : Birth F" --date "01/01/1970 00:00:00" --author "Татьяна <>" --allow-empty | |
git checkout --orphan @I35@ | |
git commit -m "Степан Голобоков : Birth M" --date "01/01/1970 00:00:00" --author "Степан Голобоков <>" --allow-empty | |
git checkout --orphan @I33@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using static System.Console; | |
namespace Expressions | |
{ | |
public enum Operation | |
{ | |
Add, | |
Mult, | |
Int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using static System.Console; | |
namespace ProgrammerCoffe | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
do |
Привет всем! Это пример длинного предложения, которое, тем не менее, разбито на несколько строк, чтобы diff был более удобным (для тех, кто пользуется GitHub для написания статей), а в текстовых редакторах не нужно было бы постоянно включать опцию "переносить по словам" или подобную, чтобы длинные строки всегда помещались в окно.
А это уже новое предложение, которое находится в следующем абзаце. Для этого нужно использовать два разрыва строки. Также стоит обратить внимание на то, что если между строками есть только
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CSharp6FeaturiesWalker : CSharpSyntaxWalker | |
{ | |
public bool CSharp6Featuries { get; private set; } | |
public CSharp6FeatureWalker() | |
{ | |
} | |
public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<IToken> codeTokens = new List<IToken>(); | |
List<IToken> commentTokens = new List<IToken>(); | |
Lexer preprocessorLexer = new CSharpLexer(new AntlrInputStream(sourceCode)); | |
// Collect all tokens with lexer (CSharpLexer.g4). | |
var tokens = preprocessorLexer.GetAllTokens(); | |
var directiveTokens = new List<IToken>(); | |
var directiveTokenSource = new ListTokenSource(directiveTokens); | |
var directiveTokenStream = new CommonTokenStream(directiveTokenSource, CSharpLexer.DIRECTIVE); | |
CSharpPreprocessorParser preprocessorParser = new CSharpPreprocessorParser(directiveTokenStream); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using static System.Console; | |
using static System.Math; | |
using static System.DayOfWeek; | |
using static System.Linq.Enumerable; | |
namespace CSharp6Samples | |
{ | |
public class Test | |
{ | |
// Initializers for auto-properties |