public static void while_(Token t) { if (SAS.Count == 0) { SemanticBoolError(t); } SAR expression = SAS.Pop(); if (expression.dataType != "bool") { SemanticBoolError(t); } string ENDWHILE = (ICode.ENDWHILE + ICode.labelCounter++) + " "; ICode.BF(expression.symid, ENDWHILE); ICode.StackEndWhile(ENDWHILE); }
public static void if_(Token t) { if (SAS.Count == 0) { SemanticBoolError(t); } SAR expression = SAS.Pop(); if (expression.dataType != "bool") { SemanticBoolError(t); } string SKIPIF = (ICode.SKIPIF + ICode.labelCounter++) + " "; ICode.BF(expression.symid, SKIPIF); ICode.StackIf(SKIPIF); }