mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
remove QID token, so that cs.g stays close to upstream
This commit is contained in:
parent
690a5af383
commit
e4bd86900b
@ -115,10 +115,10 @@ scope NSContext;
|
|||||||
}
|
}
|
||||||
:
|
:
|
||||||
'namespace' qi=qualified_identifier
|
'namespace' qi=qualified_identifier
|
||||||
{ Debug("namespace: " + $qi.text);
|
{ Debug("namespace: " + $qi.thetext);
|
||||||
$NSContext::nss.Add(new UseRepTemplate($qi.text));
|
$NSContext::nss.Add(new UseRepTemplate($qi.thetext));
|
||||||
// extend parent namespace
|
// extend parent namespace
|
||||||
$NSContext::currentNS = this.ParentNameSpace + $qi.text;
|
$NSContext::currentNS = this.ParentNameSpace + $qi.thetext;
|
||||||
}
|
}
|
||||||
namespace_block ';'? ;
|
namespace_block ';'? ;
|
||||||
namespace_block:
|
namespace_block:
|
||||||
@ -157,8 +157,8 @@ type_declaration:
|
|||||||
| enum_declaration
|
| enum_declaration
|
||||||
| delegate_declaration ;
|
| delegate_declaration ;
|
||||||
// Identifiers
|
// Identifiers
|
||||||
qualified_identifier:
|
qualified_identifier returns [string thetext]:
|
||||||
^(QID identifier+) ;
|
i1=identifier { $thetext = $i1.text; } ('.' ip=identifier { $thetext += "." + $ip.text; } )*;
|
||||||
namespace_name
|
namespace_name
|
||||||
: namespace_or_type_name ;
|
: namespace_or_type_name ;
|
||||||
|
|
||||||
|
@ -6,11 +6,6 @@ options {
|
|||||||
language=CSharp2;
|
language=CSharp2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tokens {
|
|
||||||
QID;
|
|
||||||
}
|
|
||||||
|
|
||||||
@namespace { RusticiSoftware.Translator.CSharp }
|
@namespace { RusticiSoftware.Translator.CSharp }
|
||||||
|
|
||||||
@lexer::header
|
@lexer::header
|
||||||
@ -74,8 +69,7 @@ type_declaration:
|
|||||||
| delegate_declaration ;
|
| delegate_declaration ;
|
||||||
// Identifiers
|
// Identifiers
|
||||||
qualified_identifier:
|
qualified_identifier:
|
||||||
identifier ('.' identifier)*
|
identifier ('.' identifier)*;
|
||||||
-> ^(QID identifier+) ;
|
|
||||||
namespace_name
|
namespace_name
|
||||||
: namespace_or_type_name ;
|
: namespace_or_type_name ;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user