Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(539)

Issue 2470041: Refactor a simpler consistent api for constructing parse trees (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 8 months ago by Jasvir
Modified:
15 years, 3 months ago
Reviewers:
ihab.awad
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

ParserContext is a parse tree node builder which accumulates inputs and builds a parse tree node with the information it has. This change just introduces the builder and some tests. A separate CL will replace the many variations of creating PTNs with this api.

Patch Set 1 #

Patch Set 2 : Refactor a simpler consistent api for constructing parse trees #

Total comments: 35

Patch Set 3 : Refactor a simpler consistent api for constructing parse trees #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+527 lines, -108 lines) Patch
A src/com/google/caja/parser/ParserContext.java View 1 2 1 chunk +332 lines, -0 lines 4 comments Download
M src/com/google/caja/plugin/BuildServiceImplementation.java View 6 chunks +21 lines, -14 lines 0 comments Download
M src/com/google/caja/plugin/Config.java View 4 chunks +0 lines, -7 lines 0 comments Download
M src/com/google/caja/plugin/PluginCompilerMain.java View 8 chunks +33 lines, -80 lines 1 comment Download
M src/com/google/caja/service/HtmlHandler.java View 2 chunks +6 lines, -3 lines 0 comments Download
M src/com/google/caja/service/JsHandler.java View 3 chunks +9 lines, -4 lines 0 comments Download
A tests/com/google/caja/parser/ParserContextTest.java View 1 2 1 chunk +126 lines, -0 lines 8 comments Download

Messages

Total messages: 5
Jasvir
15 years, 8 months ago (2010-10-13 00:52:13 UTC) #1
ihab.awad
Looks like a great direction! Not sure what level of comments you wanted -- I ...
15 years, 8 months ago (2010-10-20 21:15:56 UTC) #2
Jasvir
Thanks for the comments - its exactly the kind of feedback I was looking for. ...
15 years, 8 months ago (2010-10-26 00:04:32 UTC) #3
ihab.awad
I think the with() methods should be grouped, as you noted in your earlier reply, ...
15 years, 3 months ago (2011-03-14 22:49:35 UTC) #4
Jasvir
15 years, 3 months ago (2011-03-19 20:31:04 UTC) #5
Updated patch to use withInputs, withConfig to group options.

Submitted @4398

http://codereview.appspot.com/2470041/diff/13001/src/com/google/caja/parser/P...
File src/com/google/caja/parser/ParserContext.java (right):

http://codereview.appspot.com/2470041/diff/13001/src/com/google/caja/parser/P...
src/com/google/caja/parser/ParserContext.java:108: public ParserContext
with(InputSource is) {
Because an InputSource might be all that is provided instead of rather than in
addition to textual content.

On 2011/03/14 22:49:35, ihab.awad wrote:
> Why should InputSource be specified independently of some input that it
> describes? Like maybe with(String content) should be with(InputSource is,
String
> content) instead?

http://codereview.appspot.com/2470041/diff/13001/tests/com/google/caja/parser...
File tests/com/google/caja/parser/ParserContextTest.java (right):

http://codereview.appspot.com/2470041/diff/13001/tests/com/google/caja/parser...
tests/com/google/caja/parser/ParserContextTest.java:1: // Copyright (C) 2008
Google Inc.
On 2011/03/14 22:49:35, ihab.awad wrote:
> Is this correct?

Done.

http://codereview.appspot.com/2470041/diff/13001/tests/com/google/caja/parser...
tests/com/google/caja/parser/ParserContextTest.java:21: import
com.google.appengine.repackaged.com.google.common.collect.Maps;
On 2011/03/14 22:49:35, ihab.awad wrote:
> Is this correct?

Done.

http://codereview.appspot.com/2470041/diff/13001/tests/com/google/caja/parser...
tests/com/google/caja/parser/ParserContextTest.java:62: } catch (Throwable e) {
On 2011/03/14 22:49:35, ihab.awad wrote:
> Can just declare test function "throws Exception" and be done with it.

Done.

http://codereview.appspot.com/2470041/diff/13001/tests/com/google/caja/parser...
tests/com/google/caja/parser/ParserContextTest.java:106:
"cssparserinput1.css").toURL().openStream();
On 2011/03/14 22:49:35, ihab.awad wrote:
> Indentation

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b