+2010-05-28 Marek Safar <marek.safar@gmail.com>
+
+ * cs-tokenizer.cs: Made tab size configurable.
+
2010-05-27 Marek Safar <marek.safar@gmail.com>
* attribute.cs: Ensure Obsolete members are defined before doing
int col = 0;
int previous_col;
int current_token;
+ int tab_size;
bool handle_get_set = false;
bool handle_remove_add = false;
bool handle_where = false;
get { return handle_typeof; }
set { handle_typeof = value; }
}
+
+ public int TabSize {
+ get { return tab_size; }
+ set { tab_size = value; }
+ }
public XmlCommentState doc_state {
get { return xml_doc_state; }
xml_comment_buffer = new StringBuilder ();
+ if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+ tab_size = 4;
+ else
+ tab_size = 8;
+
//
// FIXME: This could be `Location.Push' but we have to
// find out why the MS compiler allows this
int d = peek_char ();
if (d == '?') {
get_char ();
- val = LocatedToken.Create (ref_line, col);
return Token.OP_COALESCING;
}
while ((c = get_char ()) != -1) {
switch (c) {
case '\t':
- col = ((col + 8) / 8) * 8;
+ col = ((col + tab_size) / tab_size) * tab_size;
continue;
case ' ':