Beispiel #1
0
		public  Statement (Parser yyp, StateChange  sc ):base(((LSLSyntax
		                                                       )yyp)){ kids . Add ( sc );
		}
Beispiel #2
0
 /// <summary>
 /// Generates the code for a StateChange node.
 /// </summary>
 /// <param name="sc">The StateChange node.</param>
 /// <returns>String containing C# code for StateChange sc.</returns>
 private string GenerateStateChange(StateChange sc)
 {
     //State is in the LSL_Api because it requires a ref to the ScriptEngine, which we can't have in the ScriptBase
     string retStr = GenerateLine("try", null);
     retStr += GenerateLine("{", null);
     retStr += Generate(
          String.Format("((ILSL_Api)m_apis[\"ll\"]).state(\"{0}\");", sc.NewState)
          , sc);
     retStr += GenerateLine("}", null);
     retStr += GenerateLine("catch", null);
     retStr += GenerateLine("{", null);
     retStr += GenerateLine("yield break;", null);
     retStr += GenerateLine("}", null);
     return retStr;
 }
 /// <summary>
 /// Generates the code for a StateChange node.
 /// </summary>
 /// <param name="sc">The StateChange node.</param>
 /// <returns>String containing C# code for StateChange sc.</returns>
 private string GenerateStateChange(StateChange sc)
 {
     return Generate(String.Format("state(\"{0}\")", sc.NewState), sc);
 }
 /// <summary>
 /// Generates the code for a StateChange node.
 /// </summary>
 /// <param name="sc">The StateChange node.</param>
 /// <returns>String containing C# code for StateChange sc.</returns>
 private string GenerateStateChange(StateChange sc)
 {
     //State is in the LSL_Api because it requires a ref to the ScriptEngine, which we can't have in the ScriptBase
     return Generate(String.Format("((ILSL_Api)m_apis[\"ll\"]).state(\"{0}\")", sc.NewState), sc);
 }