teepee 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/teepee/command-parser.rb +4 -0
- data/lib/teepee/commander.rb +8 -0
- data/lib/teepee/single-character-token.rb +9 -1
- data/lib/teepee/tokenizer.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 549314045aca7b80a49b97096c2299483c9983f4
|
4
|
+
data.tar.gz: eb3828ca4054f244ed28a73c89584c6e72f7ef7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea45df2dc3e916ad03da17b8d21333ef8600333c5f7815493243222d66716a2785d113433eb6cc6337651adea729da98e6fcffbaf2e491bd17ba1e693c28125a
|
7
|
+
data.tar.gz: 41cf4f81b324a8294801f6d01a0b3a395495e28e68b4505e55f0b9d5f76b06049c3f8b2127dce5308dd604f9553844743dc964b4d04e5a3a47033cdc7e37b75d
|
data/lib/teepee/commander.rb
CHANGED
@@ -399,6 +399,10 @@ module Teepee
|
|
399
399
|
html_tag :h6, expressions
|
400
400
|
end
|
401
401
|
|
402
|
+
def hash
|
403
|
+
"#"
|
404
|
+
end
|
405
|
+
|
402
406
|
def i
|
403
407
|
command_error "Complex numbers are not yet supported."
|
404
408
|
end
|
@@ -520,6 +524,10 @@ module Teepee
|
|
520
524
|
Math::PI
|
521
525
|
end
|
522
526
|
|
527
|
+
def pipe
|
528
|
+
"|"
|
529
|
+
end
|
530
|
+
|
523
531
|
def radians2degrees radians
|
524
532
|
ensure_numeric(radians * 180.0 / Math::PI)
|
525
533
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# -*- mode: Ruby -*-
|
3
3
|
|
4
|
-
# Copyright © 2013-
|
4
|
+
# Copyright © 2013-2016, Christopher Mark Gore,
|
5
5
|
# Soli Deo Gloria,
|
6
6
|
# All rights reserved.
|
7
7
|
#
|
@@ -69,4 +69,12 @@ module Teepee
|
|
69
69
|
class RightBraceToken < SingleCharacterToken
|
70
70
|
CHARACTER_MATCHED = "}"
|
71
71
|
end
|
72
|
+
|
73
|
+
class PipeToken < SingleCharacterToken
|
74
|
+
CHARACTER_MATCHED = "|"
|
75
|
+
end
|
76
|
+
|
77
|
+
class HashToken < SingleCharacterToken
|
78
|
+
CHARACTER_MATCHED = "#"
|
79
|
+
end
|
72
80
|
end
|
data/lib/teepee/tokenizer.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
# -*- mode: Ruby -*-
|
3
3
|
|
4
|
-
# Copyright © 2013-
|
4
|
+
# Copyright © 2013-2016, Christopher Mark Gore,
|
5
5
|
# Soli Deo Gloria,
|
6
6
|
# All rights reserved.
|
7
7
|
#
|
@@ -58,6 +58,8 @@ module Teepee
|
|
58
58
|
if result = BackslashToken.matches?(rest) or # Single Character Tokens
|
59
59
|
result = LeftBraceToken.matches?(rest) or
|
60
60
|
result = RightBraceToken.matches?(rest) or
|
61
|
+
result = PipeToken.matches?(rest) or
|
62
|
+
result = HashToken.matches?(rest) or
|
61
63
|
result = EmptyNewlinesToken.matches?(rest) or # String Tokens
|
62
64
|
result = WhitespaceToken.matches?(rest) or
|
63
65
|
result = NumberToken.matches?(rest) or
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teepee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Mark Gore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|