Home | History | Annotate | Download | only in parser

Lines Matching refs:Separator

563      * at most one separator. As such, separators are ordered in increasing
564 * priority, and setting a separator multiple times between text will
565 * result in the single separator with the highest priority being used.
569 static enum Separator {
571 // enum's ordinal() method is used when determining if a new separator
609 // The next separator to be inserted between two text nodes.
610 private Separator separator = Separator.None;
623 * Sets the next separator between two text nodes. A Space separator is
627 * specify this separator.
629 * A LineBreak separator (single new line) is used if text segments are
631 * etc.). The client should set this separator for opening and closing tags
634 * A BlankLine separator (two new lines) should be set for opening and
638 * separator with a higher priority will override that of a lower priority.
640 final void setSeparator(Separator newSeparator) {
641 if (newSeparator.ordinal() > separator.ordinal()) {
642 separator = newSeparator;
658 * as the next segment of text. This will flush any separator that should
676 setSeparator(Separator.Space);
682 setSeparator(Separator.Space);
709 * any separator that should be appended before it, and any quote marks
744 * Appends any pending separator to the output buffer. This should be
748 switch (separator) {
751 // Only append a space separator if we are not following a new
752 // line character. For example, we don't append a separator
769 separator = Separator.None;
837 printer.setSeparator(PlainTextPrinter.Separator.BlankLine);
844 // All other elements that break the flow add a LineBreak separator.
845 printer.setSeparator(PlainTextPrinter.Separator.LineBreak);
849 printer.setSeparator(PlainTextPrinter.Separator.LineBreak);
867 printer.setSeparator(PlainTextPrinter.Separator.BlankLine);
870 // All other elements that break the flow add a LineBreak separator.
871 printer.setSeparator(PlainTextPrinter.Separator.LineBreak);