Exemplo n.º 1
0
		void VisitChoice(Choice choice)
		{
			WriteKeyword("choice");
			Space();
			LPar();
			NewLine();
			formatter.Indent();
			foreach (INode alternative in choice) {
				VisitNodeInPattern(alternative);
				if (alternative != choice.Last()) {
					WriteToken(Roles.Comma);
				}
				NewLine();
			}
			formatter.Unindent();
			RPar();
		}
Exemplo n.º 2
0
		void VisitChoice(Choice choice)
		{
			WriteKeyword("choice");
			Space();
			var braceHelper = BraceHelper.LeftParen(this, CodeBracesRangeFlags.Parentheses);
			NewLine();
			writer.Indent();
			foreach (INode alternative in choice) {
				VisitNodeInPattern(alternative);
				if (alternative != choice.Last()) {
					WriteToken(Roles.Comma, BoxedTextColor.Punctuation);
				}
				NewLine();
			}
			writer.Unindent();
			braceHelper.RightParen();
		}