{"id":{"repo_id":"sjsu","oai_identifier":"oai:scholarworks.sjsu.edu:etd_projects-1410"},"canonical_url":"https://search.ndltd.org/etd/sjsu/oai:scholarworks.sjsu.edu:etd_projects-1410","repository":{"repo_id":"sjsu","name":"San Jose State University","base_url":"https://scholarworks.sjsu.edu/do/oai/"},"display":{"title":"Adding Syntax Parameters to the Sweet.JS Macro Library for JavaScript","abstract":"Lisp and Scheme have demonstrated the power of macros to enable programmers to evolve and craft languages. A macro is a rule or pattern that specifies how a certain input sequence should be mapped to an output sequence according to some defined procedure. Using a macro system a programmer can introduce new syntactic elements to the programming language. Macros found in a program are expanded by a macro expander and allow a programmer to enable code reuse. Mozilla Sweet.JS provides a way for developers to enrich their JavaScript code by adding new syntax to the language through the use of macros. Sweet.JS provides the possibility to define hygienic macros inspired by Scheme. “In this paper, I present the implementation of a “syntax parameter” feature for the Sweet.JS library. A syntax parameter is a mechanism for rebinding a macro defi- nition within the dynamic context of a macro expansions thereby introducing implicit identifiers in a hygienic fashion. Some time hygienic macro bindings are insufficient such as with “anaphoric conditionals\" where the value of the tested expression is avail- able as an it binding. With syntax parameters, instead of introducing the binding unhygienically each time, we instead create one binding for the keyword, which we can then adjust later when we want the keyword to have a different meaning. As no new bindings are introduced hygiene is preserved. \"","abstract_html":"Lisp and Scheme have demonstrated the power of macros to enable programmers to evolve and craft languages. A macro is a rule or pattern that specifies how a certain input sequence should be mapped to an output sequence according to some defined procedure. Using a macro system a programmer can introduce new syntactic elements to the programming language. Macros found in a program are expanded by a macro expander and allow a programmer to enable code reuse. Mozilla Sweet.JS provides a way for developers to enrich their JavaScript code by adding new syntax to the language through the use of macros. Sweet.JS provides the possibility to define hygienic macros inspired by Scheme. “In this paper, I present the implementation of a “syntax parameter” feature for the Sweet.JS library. A syntax parameter is a mechanism for rebinding a macro defi- nition within the dynamic context of a macro expansions thereby introducing implicit identifiers in a hygienic fashion. Some time hygienic macro bindings are insufficient such as with “anaphoric conditionals&quot; where the value of the tested expression is avail- able as an it binding. With syntax parameters, instead of introducing the binding unhygienically each time, we instead create one binding for the keyword, which we can then adjust later when we want the keyword to have a different meaning. As no new bindings are introduced hygiene is preserved. &quot;","abstract_has_math":false,"creators":["Kumar, Vimal"],"institution":null,"degree_name":"Master of Science (MS)","degree_level":null,"degree_discipline":"Computer Science","degree_department":null,"school":null,"contributors":["Thomas Austin","Chris Pollett","Ron Mak"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":null,"date_issued":"","date_published":null,"updated_at":"2026-11-26T14:02:10Z","subjects":["Javascript Macro Library Syntax Parameters","Programming Languages and Compilers"],"languages":[],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier","label":"Identifier","values":["https://scholarworks.sjsu.edu/etd_projects/410"],"render_values":[{"text":"https://scholarworks.sjsu.edu/etd_projects/410","href":"https://scholarworks.sjsu.edu/etd_projects/410","code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.31979/etd.69m5-2g7n","outbound_label":"DOI","outbound_source":"dc:identifier","record_url":"https://doi.org/10.31979/etd.69m5-2g7n","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Asjsu%3Aoai%3Ascholarworks.sjsu.edu%3Aetd_projects-1410","prefix":"oai_dc"},"source_record":{"url":"https://scholarworks.sjsu.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Ascholarworks.sjsu.edu%3Aetd_projects-1410","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Thomas Austin","Chris Pollett","Ron Mak"]},{"key":"dc:creator","label":"Author","values":["Kumar, Vimal"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.available","label":"Dc Date Available","values":["2015-05-26T07:00:00Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2015-05-26T07:00:00Z"]},{"key":"dc:type","label":"Dc Type","values":["Master's Project"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science (MS)"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Javascript Macro Library Syntax Parameters","Programming Languages and Compilers"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://doi.org/10.31979/etd.69m5-2g7n","https://scholarworks.sjsu.edu/etd_projects/410"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Lisp and Scheme have demonstrated the power of macros to enable programmers to evolve and craft languages. A macro is a rule or pattern that specifies how a certain input sequence should be mapped to an output sequence according to some defined procedure. Using a macro system a programmer can introduce new syntactic elements to the programming language. Macros found in a program are expanded by a macro expander and allow a programmer to enable code reuse. Mozilla Sweet.JS provides a way for developers to enrich their JavaScript code by adding new syntax to the language through the use of macros. Sweet.JS provides the possibility to define hygienic macros inspired by Scheme. “In this paper, I present the implementation of a “syntax parameter” feature for the Sweet.JS library. A syntax parameter is a mechanism for rebinding a macro defi- nition within the dynamic context of a macro expansions thereby introducing implicit identifiers in a hygienic fashion. Some time hygienic macro bindings are insufficient such as with “anaphoric conditionals\" where the value of the tested expression is avail- able as an it binding. With syntax parameters, instead of introducing the binding unhygienically each time, we instead create one binding for the keyword, which we can then adjust later when we want the keyword to have a different meaning. As no new bindings are introduced hygiene is preserved. \""]},{"key":"dc:title","label":"Title","values":["Adding Syntax Parameters to the Sweet.JS Macro Library for JavaScript"]}]}],"canonical_facts":{"dc:contributor":["Thomas Austin","Chris Pollett","Ron Mak"],"dc:creator":["Kumar, Vimal"],"dc:date.available":["2015-05-26T07:00:00Z"],"dc:date.created":["2015-05-26T07:00:00Z"],"dc:description.abstract":["Lisp and Scheme have demonstrated the power of macros to enable programmers to evolve and craft languages. A macro is a rule or pattern that specifies how a certain input sequence should be mapped to an output sequence according to some defined procedure. Using a macro system a programmer can introduce new syntactic elements to the programming language. Macros found in a program are expanded by a macro expander and allow a programmer to enable code reuse. Mozilla Sweet.JS provides a way for developers to enrich their JavaScript code by adding new syntax to the language through the use of macros. Sweet.JS provides the possibility to define hygienic macros inspired by Scheme. “In this paper, I present the implementation of a “syntax parameter” feature for the Sweet.JS library. A syntax parameter is a mechanism for rebinding a macro defi- nition within the dynamic context of a macro expansions thereby introducing implicit identifiers in a hygienic fashion. Some time hygienic macro bindings are insufficient such as with “anaphoric conditionals\" where the value of the tested expression is avail- able as an it binding. With syntax parameters, instead of introducing the binding unhygienically each time, we instead create one binding for the keyword, which we can then adjust later when we want the keyword to have a different meaning. As no new bindings are introduced hygiene is preserved. \""],"dc:identifier":["https://doi.org/10.31979/etd.69m5-2g7n","https://scholarworks.sjsu.edu/etd_projects/410"],"dc:subject":["Javascript Macro Library Syntax Parameters","Programming Languages and Compilers"],"dc:title":["Adding Syntax Parameters to the Sweet.JS Macro Library for JavaScript"],"dc:type":["Master's Project"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_name":["Master of Science (MS)"]},"updated_at":"2026-11-26T14:02:10Z"}