refactor to use common result type

This commit is contained in:
Vukašin Stepanović
2023-02-14 22:56:03 +00:00
parent 145cf704fe
commit 8ee616d96b
160 changed files with 829 additions and 901 deletions

View File

@@ -14,7 +14,10 @@
* limitations under the License.
*/
use crate::{common::BitArray, Exceptions};
use crate::{
common::{BitArray, Result},
Exceptions,
};
use super::{BinaryShiftToken, SimpleToken};
@@ -26,7 +29,7 @@ pub enum TokenType {
}
impl TokenType {
pub fn appendTo(&self, bit_array: &mut BitArray, text: &[u8]) -> Result<(), Exceptions> {
pub fn appendTo(&self, bit_array: &mut BitArray, text: &[u8]) -> Result<()> {
// let token = &self.tokens[self.current_pointer];
match self {
TokenType::Simple(a) => a.appendTo(bit_array, text),