Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v0.1.9

  • Loading branch information...
commit 63fd3bfabdf9862e89e492f3ac8ab7148455f725 1 parent 9a970e5
@nzakas nzakas authored
View
9 CHANGELOG
@@ -1,3 +1,10 @@
+July 23, 2012 - v0.1.9
+
+* Expose vendor prefix for @keyframes (fixes #29) (Nicholas C. Zakas)
+* Add support for o-keyframes and remove ms-keyframes (Nicholas C. Zakas)
+* Fix changelog (Nicholas C. Zakas)
+
+
July 23, 2012 - v0.1.8
* Merge branch 'master' of github.com:nzakas/parser-lib (Nicholas C. Zakas)
@@ -244,3 +251,5 @@ November 28, 2011 - v0.1.0
+
+
View
2  build.xml
@@ -1,7 +1,7 @@
<project name="parserlib" default="build.all">
<!-- version number -->
- <property name="parserlib.version" value="0.1.8" />
+ <property name="parserlib.version" value="0.1.9" />
<!-- the directories containing the source files -->
<property name="src.dir" value="./src" />
View
4 build/node-parserlib.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
View
4 build/npm/lib/node-parserlib.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
View
2  build/parserlib-core.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
View
2  build/parserlib-css.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
View
4 build/parserlib.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v@VERSION@, Build time: 23-July-2012 10:50:53 */
+/* Version v@VERSION@, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
View
24 release/node-parserlib.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -2999,9 +2999,15 @@ Parser.prototype = function(){
var tokenStream = this._tokenStream,
token,
tt,
- name;
+ name,
+ prefix = "";
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
this._readWhitespace();
name = this._keyframe_name();
@@ -3011,8 +3017,9 @@ Parser.prototype = function(){
this.fire({
type: "startkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -3028,8 +3035,9 @@ Parser.prototype = function(){
this.fire({
type: "endkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -5556,7 +5564,7 @@ var Tokens = [
//{ name: "ATKEYWORD"},
//CSS3 animations
- { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-ms-keyframes" ] },
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
//important symbol
{ name: "IMPORTANT_SYM"},
View
24 release/npm/lib/node-parserlib.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -2999,9 +2999,15 @@ Parser.prototype = function(){
var tokenStream = this._tokenStream,
token,
tt,
- name;
+ name,
+ prefix = "";
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
this._readWhitespace();
name = this._keyframe_name();
@@ -3011,8 +3017,9 @@ Parser.prototype = function(){
this.fire({
type: "startkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -3028,8 +3035,9 @@ Parser.prototype = function(){
this.fire({
type: "endkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -5556,7 +5564,7 @@ var Tokens = [
//{ name: "ATKEYWORD"},
//CSS3 animations
- { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-ms-keyframes" ] },
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
//important symbol
{ name: "IMPORTANT_SYM"},
View
2  release/npm/package.json
@@ -1,6 +1,6 @@
{
"name": "parserlib",
- "version": "0.1.8",
+ "version": "0.1.9",
"description": "CSSLint",
"author": "Nicholas C. Zakas",
"os": ["darwin", "linux"],
View
2  release/parserlib-core.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
View
22 release/parserlib-css.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -2089,9 +2089,15 @@ Parser.prototype = function(){
var tokenStream = this._tokenStream,
token,
tt,
- name;
+ name,
+ prefix = "";
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
this._readWhitespace();
name = this._keyframe_name();
@@ -2101,8 +2107,9 @@ Parser.prototype = function(){
this.fire({
type: "startkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -2118,8 +2125,9 @@ Parser.prototype = function(){
this.fire({
type: "endkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -4646,7 +4654,7 @@ var Tokens = [
//{ name: "ATKEYWORD"},
//CSS3 animations
- { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-ms-keyframes" ] },
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
//important symbol
{ name: "IMPORTANT_SYM"},
View
13 release/parserlib-tests.js
@@ -1368,9 +1368,18 @@
name: "Animation Parsing Tests",
testWebKitKeyFrames: function(){
- var parser = new Parser({strict:true});
+ var parser = new Parser({strict:true}),
+ called = true;
+
+ parser.addListener("startkeyframes", function(event) {
+ Assert.areEqual("webkit", event.prefix);
+ Assert.areEqual("movingbox", event.name);
+ Assert.areEqual(1, event.line, "Line should be 1");
+ Assert.areEqual(1, event.col, "Column should be 1");
+ called = true;
+ });
var result = parser.parse("@-webkit-keyframes movingbox{0%{left:90%;}}");
- Assert.isTrue(true); //just don't want an error
+ Assert.isTrue(called); //just don't want an error
},
testMozKeyFrames: function(){
View
24 release/parserlib.js
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
var parserlib = {};
(function(){
@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Version v0.1.8, Build time: 23-July-2012 09:55:09 */
+/* Version v0.1.9, Build time: 23-July-2012 10:52:31 */
(function(){
var EventTarget = parserlib.util.EventTarget,
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -2999,9 +2999,15 @@ Parser.prototype = function(){
var tokenStream = this._tokenStream,
token,
tt,
- name;
+ name,
+ prefix = "";
tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
this._readWhitespace();
name = this._keyframe_name();
@@ -3011,8 +3017,9 @@ Parser.prototype = function(){
this.fire({
type: "startkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -3028,8 +3035,9 @@ Parser.prototype = function(){
this.fire({
type: "endkeyframes",
name: name,
- line: name.line,
- col: name.col
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
});
this._readWhitespace();
@@ -5556,7 +5564,7 @@ var Tokens = [
//{ name: "ATKEYWORD"},
//CSS3 animations
- { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-ms-keyframes" ] },
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
//important symbol
{ name: "IMPORTANT_SYM"},
Please sign in to comment.
Something went wrong with that request. Please try again.