Commit cc24e248 authored by dpranke@chromium.org's avatar dpranke@chromium.org

refactor TestExpectations tokenization slightly in preparation for the new syntax

https://bugs.webkit.org/show_bug.cgi?id=96564

Reviewed by Ojan Vafai.

This change changes how we will tokenize/lex the
TestExpectations files, in preparation for supporting both the
old syntax and the new one. This change by itself should be a
no-op.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._tokenize_line):
(TestExpectationParser):
(TestExpectationParser._tokenize_line_using_old_format):
(TestExpectationParser._tokenize_line_using_new_format):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7c6b28b1
2012-09-12 Dirk Pranke <dpranke@chromium.org>
refactor TestExpectations tokenization slightly in preparation for the new syntax
https://bugs.webkit.org/show_bug.cgi?id=96564
Reviewed by Ojan Vafai.
This change changes how we will tokenize/lex the
TestExpectations files, in preparation for supporting both the
old syntax and the new one. This change by itself should be a
no-op.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._tokenize_line):
(TestExpectationParser):
(TestExpectationParser._tokenize_line_using_old_format):
(TestExpectationParser._tokenize_line_using_new_format):
2012-09-12 Dirk Pranke <dpranke@chromium.org>
remove unused testexpectations editing code from webkitpy, garden-o-matic
......
......@@ -207,6 +207,11 @@ class TestExpectationParser(object):
@classmethod
def _tokenize_line(cls, filename, expectation_string, line_number):
# FIXME: Add in support for the new format as well.
return cls._tokenize_line_using_old_format(filename, expectation_string, line_number)
@classmethod
def _tokenize_line_using_old_format(cls, filename, expectation_string, line_number):
"""Tokenizes a line from TestExpectations and returns an unparsed TestExpectationLine instance.
The format of a test expectation line is:
......@@ -245,6 +250,11 @@ class TestExpectationParser(object):
return expectation_line
@classmethod
def _tokenize_line_using_new_format(cls, filename, expectation_string, line_number):
# FIXME: implement :).
raise NotImplementedError
@classmethod
def _split_space_separated(cls, space_separated_string):
"""Splits a space-separated string into an array."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment