From: Jakub Jankiewicz <jcubic@onet.pl>
To: help-gnu-emacs@gnu.org
Subject: Use JS regex syntax in Scheme mode
Date: Sat, 8 Aug 2020 20:59:19 +0200 [thread overview]
Message-ID: <20200808205919.77e5e778@jcubic> (raw)
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
Hi,
Is it possible to merge any JS mode that have regular expressions and
integrate it with scheme mode? How hard it would be?
I have Lisp written in JavaScript https://jcubic.github.io/lips/
and I would like to have proper Emacs Mode for my language. The language
is based on scheme (almost 100% compatibile with R5RS and I'm wokring on
R7RS) but have few extensions like literal regular expressions that are almost
the same as one in JavaScript except it can't have space after first / to
prevent matching expressions like
(/ (* 10 (/ 10 2))
I thikng that I will disable completly spaces in regexes to prevent any
ambiguity.
I also have object literals that are create created using syntax extensions
I've created for my language:
&(:foo 10 :bar 20)
create JS object & is the same as ` or ' in scheme it map to macro call.
I have some experience with Emacs Lisp, but I didn't read much code and I
don't have much experience in creating Emacs modes, even that I have
created one that is on GitHub (for JS & PHP code coverage that I was not able
to merge with coverage.el because original author only care about Ruby).
Could anyone give me some tips how should I go about and create such mode?
Where I should look for regexes in JS mode and how should go about and adding
them to scheme mode?
Thanks
Jakub
--
Jakub Jankiewicz, Web Developer
https://jcubic.pl/me
[-- Attachment #2: Podpis cyfrowy OpenPGP --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
reply other threads:[~2020-08-08 18:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200808205919.77e5e778@jcubic \
--to=jcubic@onet.pl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).