コード例 #1
0
 public void Error(string s, int line = 0, int row = 0)
 {
     if (line > 0)
     {
         Console.WriteLine("(" + line.ToString() + "," + row.ToString() + "):" + s);
         ErrorList.Add(lex.GetLineNo() + " : " + s);
     }
     else
     {
         Console.WriteLine("(" + lex.GetLineNo().ToString() + "," + lex.GetRowNo().ToString() + "):" + s);
         ErrorList.Add(lex.GetLineNo() + " : " + s);
     }
 }