From 39a5b5ef0ddefb1eb336377f78d99e506f1a14eb Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 28 Jan 2018 14:03:57 -0800 Subject: [PATCH] add some comments about CSIParser --- src/term/csi.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/term/csi.rs b/src/term/csi.rs index d0be51c3d..834a891a0 100644 --- a/src/term/csi.rs +++ b/src/term/csi.rs @@ -25,8 +25,16 @@ pub enum CSIAction { EraseInLine(LineErase), } +/// Constrol Sequence Initiator (CSI) Parser. +/// Since many sequences allow for composition of actions by separating +/// parameters using the ; character, we need to be able to iterate over +/// the set of parsed actions from a given CSI sequence. +/// CSIParser implements an Iterator that yields CSIAction instances as +/// it parses them out from the input sequence. pub struct CSIParser<'a> { intermediates: &'a [u8], + /// From vte::Perform: this flag is set when more than two intermediates + /// arrived and subsequent characters were ignored. ignore: bool, byte: char, params: Option<&'a [i64]>,