fix #856
This commit is contained in:
parent
0b6f46ff4c
commit
6cd9abd936
|
|
@ -546,8 +546,14 @@ namespace CodeCompletion
|
|||
s = parser.LanguageInformation.FindExpressionForMethod(off,test_str,line,col,'(',ref num_param);
|
||||
assert(s.Trim(' ','\n','\t') == "Console.WriteLine");
|
||||
assert(num_param==0);
|
||||
|
||||
test_str = "&var.&uses.&procedure";
|
||||
|
||||
test_str = "System.Math.DivRem";
|
||||
off = test_str.Length;
|
||||
s = parser.LanguageInformation.FindExpressionForMethod(off, test_str, line, col, '(', ref num_param);
|
||||
assert(s.Trim(' ', '\n', '\t') == "System.Math.DivRem");
|
||||
assert(num_param == 0);
|
||||
|
||||
test_str = "&var.&uses.&procedure";
|
||||
off = test_str.Length;
|
||||
s = parser.LanguageInformation.FindExpressionForMethod(off,test_str,line,col,'(',ref num_param);
|
||||
assert(s == test_str);
|
||||
|
|
@ -682,6 +688,8 @@ namespace CodeCompletion
|
|||
assert(s.Trim(' ', '\n', '\t') == "Power");
|
||||
assert(num_param == 2);
|
||||
|
||||
|
||||
|
||||
string str = null;
|
||||
//mouse hover
|
||||
test_str = "sin(2)";
|
||||
|
|
|
|||
|
|
@ -2513,7 +2513,7 @@ namespace PascalABCCompiler.Parsers
|
|||
string op = Text.Substring(i - 2, 3).ToLower().Trim();
|
||||
if (op == "and" || op == "div" || op == "mod" || op == "xor")
|
||||
{
|
||||
if (!char.IsLetterOrDigit(Text[i - 3]) && Text[i - 3] != '_' && Text[i - 3] != '&')
|
||||
if (!char.IsLetterOrDigit(Text[i - 3]) && Text[i - 3] != '_' && Text[i - 3] != '&' && !(i + 1 < Text.Length && char.IsLetterOrDigit(Text[i + 1])))
|
||||
{
|
||||
next = i - 3;
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue