token
This commit is contained in:
parent
feea3bc3d3
commit
d0b512d8bf
2 changed files with 44 additions and 0 deletions
14
src/Nyanbyte.Cli/Cli.cs
Normal file
14
src/Nyanbyte.Cli/Cli.cs
Normal 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();
|
||||
}
|
||||
}
|
30
src/Nyanbyte.Cli/CliParser.cs
Normal file
30
src/Nyanbyte.Cli/CliParser.cs
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue