コード例 #1
0
ファイル: Parser.cs プロジェクト: katiearriagam/Marbles
 /// <summary>
 /// Function called when a <see cref="ConstantBoolean"/> is read. Calls the corresponding
 /// functions in <see cref="QuadrupleManager"/> that handles the expression.
 /// Called by <see cref="FACTOR"/>.
 /// </summary>
 void BOOL()
 {
     if (la.kind == 2)           // true
     {
         Get();
         try { QuadrupleManager.ReadConstantBool(true); }
         catch (Exception e) { SemErr(e.Message); }
     }
     else if (la.kind == 3)             // false
     {
         Get();
         try { QuadrupleManager.ReadConstantBool(false); }
         catch (Exception e) { SemErr(e.Message); }
     }
     else
     {
         SynErr(62);
     }
 }