Commit dd03cb8a by Aaron Leung

Adding another constructor to the Token class. May come in handy.

parent 0cb702ba
#include <string>
#include <sstream>
#include <cstring>
#include "prelexer.hpp"
namespace Sass {
......@@ -30,21 +31,31 @@ namespace Sass {
operator bool()
{ return begin && end && begin >= end; }
// static Token make()
// {
// Token t;
// t.begin = 0;
// t.end = 0;
// return t;
// }
//
static Token make(const char* b = 0, const char* e = 0)
static Token make()
{
Token t;
t.begin = 0;
t.end = 0;
return t;
}
static Token make(const char* s)
{
Token t;
t.begin = s;
t.end = s + std::strlen(s);
return t;
}
static Token make(const char* b, const char* e)
{
Token t;
t.begin = b;
t.end = e;
return t;
}
};
struct Dimension {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment