Esempio n. 1
0
 public override void ExitStatement(GolangParser.StatementContext context)
 {
     if (context.simpleStmt() != null && context.simpleStmt().emptyStmt() == null)
     {
         if (m_simpleStatements.TryGetValue(context.simpleStmt(), out string statememt))
         {
             m_targetFile.Append(statememt);
         }
         else
         {
             AddWarning(context, $"Failed to find simple statement for: {context.GetText()}");
         }
     }
 }
Esempio n. 2
0
 public override void ExitStatement(GolangParser.StatementContext context)
 {
     if (context.simpleStmt() != null && context.simpleStmt().emptyStmt() == null)
     {
         if (m_simpleStatements.TryGetValue(context.simpleStmt(), out string statement))
         {
             m_targetFile.Append($"{statement}{(LineTerminatorAhead(context.simpleStmt()) ? "" : Environment.NewLine)}");
         }
         else
         {
             AddWarning(context, $"Failed to find simple statement for: {context.simpleStmt().GetText()}");
         }
     }
 }