Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Anviking/Chromatism
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed Oct 5, 2013
2 parents 784f0d7 + f3575f2 commit f1f47a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
20 changes: 20 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2013 Johannes Lund

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ Chromatism

This is the beginning of a syntax highlighting `UITextView` for iOS. Currently it only knows about Obj-C. Previously Chromatism used a combination of `CoreText` and `UITableView` for performance, but luckily that is not needed anymore.

**Chromatism is currently unstable, changing quickly and without test-coverage.**

![](http://anviking.com/img/chromatism_black.png)

How to add Chromatism to your application:
## License
MIT, see [LICENSE.txt](https://github.com/Anviking/Chromatism/blob/master/LICENSE.txt). If you develop Chromatism further, sharing your improvements are encouraged.

## How to add Chromatism to your application:

1. Drag and drop `Chromatism.xcodeproj` to your project.
2. Add `Chromatism` as a target dependency and link to `libChromatism.a`
Expand All @@ -18,7 +23,6 @@ How to add Chromatism to your application:
- `JLScope` has a `NSMutableIndexSet`-property that corresponds to ranges in the textStorage. Scopes can be arranged in a hierarchy. A scope's children is stored in the `subscopes` property, and a scopes parent is simply called its `scope`. A scope can be executed via the `-perform`-method. The method causes subscopes to perform cascadingly.
- `JLTokenPattern` is a subclass of `JLScope`. It has a regex-pattern that in `-perform` searches through the ranges of its parent scope.

####However, the project is changing quickly.

## Scopes and Patterns
Scopes and patters can ensure that regex patterns search in the right place. To understand how they work, it is helpful to know what happens in the `-perform` method.
Expand All @@ -29,4 +33,3 @@ Scopes and patters can ensure that regex patterns search in the right place. To

For more detail, see the `-perform`-implementation on [`JLScope`](https://github.com/Anviking/Chromatism/blob/master/Chromatism/Chromatism/JLScope.m#65) and [`JLTokenPattern`](https://github.com/Anviking/Chromatism/blob/master/Chromatism/Chromatism/JLTokenPattern.m#56).


0 comments on commit f1f47a9

Please sign in to comment.