From 743261148086abc5cc8f29f1aa1f9b1ed340f5f8 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 4 Feb 2021 11:03:30 -0800 Subject: [PATCH] Revert "Revert "Remove dependency on package:charcode (#66)" (#70)" (#73) This reverts commit 22df00f357f9f5db92e55fe9a07d6aa986700bec. --- CHANGELOG.md | 2 ++ lib/src/charcode.dart | 15 +++++++++++++++ lib/src/highlighter.dart | 2 +- lib/src/span.dart | 2 +- pubspec.yaml | 3 +-- 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 lib/src/charcode.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 599835f..6f78c4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# 1.8.1 + # 1.8.0 * Stable release for null safety. diff --git a/lib/src/charcode.dart b/lib/src/charcode.dart new file mode 100644 index 0000000..5182638 --- /dev/null +++ b/lib/src/charcode.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// "Carriage return" control character. +const int $cr = 0x0D; + +/// "Line feed" control character. +const int $lf = 0x0A; + +/// Space character. +const int $space = 0x20; + +/// "Horizontal Tab" control character, common name. +const int $tab = 0x09; diff --git a/lib/src/highlighter.dart b/lib/src/highlighter.dart index f622c4e..5d28fc3 100644 --- a/lib/src/highlighter.dart +++ b/lib/src/highlighter.dart @@ -4,11 +4,11 @@ import 'dart:math' as math; -import 'package:charcode/charcode.dart'; import 'package:collection/collection.dart'; import 'package:path/path.dart' as p; import 'package:term_glyph/term_glyph.dart' as glyph; +import 'charcode.dart'; import 'colors.dart' as colors; import 'location.dart'; import 'span.dart'; diff --git a/lib/src/span.dart b/lib/src/span.dart index 94c05ba..ba8bec7 100644 --- a/lib/src/span.dart +++ b/lib/src/span.dart @@ -2,10 +2,10 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'package:charcode/charcode.dart'; import 'package:path/path.dart' as p; import 'package:term_glyph/term_glyph.dart' as glyph; +import 'charcode.dart'; import 'file.dart'; import 'highlighter.dart'; import 'location.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index c589022..12382a5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: source_span -version: 1.8.0 +version: 1.8.1-dev description: A library for identifying source spans and locations. homepage: https://github.com/dart-lang/source_span @@ -8,7 +8,6 @@ environment: sdk: ">=2.12.0-0.0 <3.0.0" dependencies: - charcode: ^1.2.0 collection: ^1.15.0 path: ^1.8.0 term_glyph: ^1.2.0