예제 #1
0
 /// <summary>
 /// Gets a node's declaration as a string
 /// </summary>
 /// <param name="declaredNode">The node to get the declaration of</param>
 /// <returns>A string describing the declaration of the node</returns>
 private static string GetDeclarationString(IDeclaredNode declaredNode)
 {
     return($"Declaration: {(declaredNode.Declaration is null ? "not set" : declaredNode.Declaration.ToString())}");
 }
예제 #2
0
 /// <summary>
 /// Gets a node's declaration as a string
 /// </summary>
 /// <param name="declaredNode">The node to get the declaration of</param>
 /// <returns>A string describing the declaration of the node</returns>
 private static string GetDeclarationString(IDeclaredNode declaredNode)
 {
     return($"Declaration: {(declaredNode.Declaration is null ? "identifier at "+declaredNode.Position +" is user-input variable or not declared" : declaredNode.Declaration.ToString())}");
 }