Exemplo n.º 1
0
        public string Visit(IsVoid node)
        {
            var    v   = method.Add_local("expr", true);
            string exp = Visit(node.exp);

            method.Add_Instruction(new CIL_is_void(v, exp));
            return(v);
        }
 public bool Visit(IsVoid node)
 {
     return(this.Visit(node.exp));
 }
Exemplo n.º 3
0
        private void MakeupFields()
        {
            canEdit = false;
            List <ArcNote> selected = AdeCursorManager.Instance.SelectedNotes;
            int            count    = selected.Count;

            if (count == 0)
            {
                Panel.gameObject.SetActive(false);
                return;
            }
            else
            {
                SelectParent.gameObject.SetActive(false);
                if (count == 1)
                {
                    if (selected[0] is ArcArcTap)
                    {
                        SelectParent.gameObject.SetActive(true);
                    }
                }
                Timing.gameObject.SetActive(true);
                Track.gameObject.SetActive(true);
                EndTiming.gameObject.SetActive(true);
                StartPos.gameObject.SetActive(true);
                EndPos.gameObject.SetActive(true);
                LineType.gameObject.SetActive(true);
                Color.gameObject.SetActive(true);
                IsVoid.gameObject.SetActive(true);
                foreach (var s in selected)
                {
                    if (Track.gameObject.activeSelf)
                    {
                        Track.gameObject.SetActive(s is ArcTap || s is ArcHold);
                    }
                    if (EndTiming.gameObject.activeSelf)
                    {
                        EndTiming.gameObject.SetActive(s is ArcLongNote);
                    }
                    if (StartPos.gameObject.activeSelf)
                    {
                        StartPos.gameObject.SetActive(s is ArcArc);
                    }
                    if (EndPos.gameObject.activeSelf)
                    {
                        EndPos.gameObject.SetActive(s is ArcArc);
                    }
                    if (LineType.gameObject.activeSelf)
                    {
                        LineType.gameObject.SetActive(s is ArcArc);
                    }
                    if (Color.gameObject.activeSelf)
                    {
                        Color.gameObject.SetActive(s is ArcArc);
                    }
                    if (IsVoid.gameObject.activeSelf)
                    {
                        IsVoid.gameObject.SetActive(s is ArcArc);
                    }
                }
                bool    multiple = count != 1;
                ArcNote note     = selected[0];
                Timing.GetComponentInChildren <InputField>().text = multiple ? "-" : note.Timing.ToString();
                if (Track.gameObject.activeSelf)
                {
                    Track.GetComponentInChildren <InputField>().text = multiple ? "-" : (note is ArcTap ? (note as ArcTap).Track.ToString() : (note as ArcHold).Track.ToString());
                }
                if (EndTiming.gameObject.activeSelf)
                {
                    EndTiming.GetComponentInChildren <InputField>().text = multiple ? "-" : (note as ArcLongNote).EndTiming.ToString();
                }
                if (StartPos.gameObject.activeSelf)
                {
                    StartPos.GetComponentInChildren <InputField>().text = multiple ? "-,-" : $"{(note as ArcArc).XStart.ToString("f2")},{(note as ArcArc).YStart.ToString("f2")}";
                }
                if (EndPos.gameObject.activeSelf)
                {
                    EndPos.GetComponentInChildren <InputField>().text = multiple ? "-,-" : $"{(note as ArcArc).XEnd.ToString("f2")},{(note as ArcArc).YEnd.ToString("f2")}";
                }
                if (LineType.gameObject.activeSelf)
                {
                    LineType.GetComponentInChildren <Dropdown>().value = multiple ? 0 : (int)(note as ArcArc).LineType;
                }
                if (Color.gameObject.activeSelf)
                {
                    Color.GetComponentInChildren <Dropdown>().value = multiple ? 0 : (note as ArcArc).Color;
                }
                if (IsVoid.gameObject.activeSelf)
                {
                    IsVoid.GetComponentInChildren <Toggle>().isOn = multiple ? false : (note as ArcArc).IsVoid;
                }
                Panel.gameObject.SetActive(true);
            }
            canEdit = true;
        }
Exemplo n.º 4
0
 public void Visit(IsVoid node)
 {
     Visit(node.Expr);
     node.computedType = Context.GetType("Bool");
 }
Exemplo n.º 5
0
 public IType Visit(IsVoid node)
 {
     this.Visit(node.exp);
     return(Context.GetType("Bool"));
 }
Exemplo n.º 6
0
 public bool Visit(IsVoid node)
 {
     throw new System.NotImplementedException();
 }