This commit is contained in:
femsci 2023-10-13 15:45:51 +02:00
parent feea3bc3d3
commit d0b512d8bf
Signed by: femsci
GPG key ID: 08F7911F0E650C67
2 changed files with 44 additions and 0 deletions

14
src/Nyanbyte.Cli/Cli.cs Normal file
View file

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Nyanbyte.Cli;
public class Cli
{
public static T Parse<T>()
{
throw new NotImplementedException();
}
}

View file

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Nyanbyte.Cli;
public class CliParser
{
const char C_ESCAPE = '\\', C_QUOTE = '\'', C_DQUOTE = '"', C_SEP = ' ';
public CliParser(string data)
{
_data = data;
}
public string _data;
public void Tokenize()
{
bool escaped = false, quotes = false, strict = false;
for (int idx = 0; idx < _data.Length; ++idx)
{
char c = _data[idx];
//Analyze character
}
throw new NotImplementedException();
}
}