Renamed T_EXCLAMATION to T_BANG.

This is way easier to type.
This commit is contained in:
Yorick Peterse 2014-02-26 21:54:27 +01:00
parent 684eccd3e2
commit 0a336e76d3
2 changed files with 21 additions and 21 deletions

View File

@ -76,7 +76,7 @@ module Oga
smaller = '<';
greater = '>';
slash = '/';
exclamation = '!';
bang = '!';
equals = '=';
colon = ':';
dash = '-';
@ -85,7 +85,7 @@ module Oga
d_quote = '"';
# FIXME: there really should be a better way of doing this.
text = (any - s_quote - d_quote - equals - exclamation - slash -
text = (any - s_quote - d_quote - equals - bang - slash -
greater - smaller - whitespace - newline - colon - dash)+;
# Unicode characters, taken from whitequark's wonderful parser library.
@ -104,7 +104,7 @@ module Oga
s_quote => { t(:T_SQUOTE) };
dash => { t(:T_DASH) };
colon => { t(:T_COLON) };
exclamation => { t(:T_EXCLAMATION) };
bang => { t(:T_BANG) };
equals => { t(:T_EQUALS) };
text => { t(:T_TEXT) };
*|;

View File

@ -104,7 +104,7 @@ describe Oga::Lexer do
example 'lex a comment' do
lex('<!-- foo -->').should == [
[:T_SMALLER, '<', 1, 1],
[:T_EXCLAMATION, '!', 1, 2],
[:T_BANG, '!', 1, 2],
[:T_DASH, '-', 1, 3],
[:T_DASH, '-', 1, 4],
[:T_SPACE, ' ', 1, 5],