Loading ...
Sorry, an error occurred while loading the content.

2271Re: Has JSLINT.tree changed?

Expand Messages
  • Deva Satyam
    Jun 7 4:04 AM
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Merlin" <g7awz@...> wrote:
      >
      > --- In jslint_com@yahoogroups.com, Satyam <satyam@> wrote:
      > > I use the following code:
      >
      > Your code does not look correct to me.
      >
      > For example, look at the tree for the program
      >
      > var a = "fred", b = "jim";
      >
      > Here is the tree:
      >
      > var tree = {
      > "value": "(begin)",
      > "first": [
      > {
      > "value": "var",
      > "arity": "statement",
      > "first": [
      > {
      > "value": "=",
      > "arity": "infix",
      > "first": {
      > "value": "a"
      > },
      > "second": {
      > "value": "fred"
      > }
      > },
      > {
      > "value": "=",
      > "arity": "infix",
      > "first": {
      > "value": "b"
      > },
      > "second": {
      > "value": "jim"
      > }
      > }
      > ]
      > }
      > ]
      > };
      >
      > arity does not take values like "string' or "number"
      >
      Then, perhaps, we might have found a bug since the tree elements with values "a" and "b" are clearly not of the same nature as those of values "fred" and "jim", the former being identifiers the later literal values. How could you tell which is what? Is "jim" a literal or the identifier of a variable called "jim". Should I figure out that "b" must be an identifier since the "=" infix operator cannot take a literal as a "first" (left hand side) operand? It would be more handy if each element has its "arity" property stated as it did before.

      The code in my question used to work with some previous version (I recovered it from a backup), the one dated 2011-03-07. So something has, indeed, changed.
    • Show all 8 messages in this topic