Closed Bug 583001 Opened 14 years ago Closed 14 years ago

narcissus REPL

Categories

(Other Applications Graveyard :: Narcissus, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dherman, Assigned: dherman)

References

Details

Attachments

(1 file, 1 obsolete file)

It should be pretty easy to add an interactive mode to Narcissus, so it's more-or-less drop-in-replaceable for the JS shell. Dave
Depends on: 582999
Attached patch adds interactive REPL to narcissus (obsolete) (deleted) — Splinter Review
Attachment #462205 - Flags: review?
Attachment #462205 - Flags: review? → review?(pwalton)
Comment on attachment 462205 [details] [diff] [review] adds interactive REPL to narcissus >+ if (typeof x == "object") { >+ if (x != null && "toSource" in x) { >+ try { >+ print(x.toSource()); >+ } catch (e) { >+ } Maybe something should be printed here. >+ } else { >+ print("null"); >+ } >+ } else if (typeof x == "string") { >+ print(uneval(x)); >+ } else if (typeof x != "undefined") { >+ print(String(x)); Do you mean the string() function below?
> Maybe something should be printed here. I should've commented-- the somewhat weird logic is (at least roughly) tracking the JS shell, just because I figured acting gratuitously differently might confuse someone trying to debug Narcissus. I'll add comments to the function. > >+ } else if (typeof x != "undefined") { > >+ print(String(x)); > > Do you mean the string() function below? Since it's not an object, it can't throw, so there's no need to call the string() function. I'll add a comment. Dave
Keywords: narcissus
Assignee: dherman → nobody
Component: JavaScript Engine → Narcissus
Product: Core → Other Applications
QA Contact: general → narcissus
Assignee: nobody → dherman
Keywords: narcissus
Attachment #462205 - Flags: review?(pwalton) → review-
Rebased and added comments to address pwalton's review. Dave
Attachment #462205 - Attachment is obsolete: true
Attachment #463346 - Flags: review?
Attachment #463346 - Flags: review? → review?(pwalton)
Comment on attachment 463346 [details] [diff] [review] adds interactive REPL to narcissus r=me
Attachment #463346 - Flags: review?(pwalton) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: