English 中文(简体)
撰写Javascript RV以外的另一种语言?
原标题:Write another language above Javascript VM?

我很想知道,是否有可能在贾瓦特谢克尔之外写出新的语言,以便你能够把你的语言——这以 j语为基础——并且与当地人一道工作。

例:

var person_exists = true; // native js

Animal eats banana // my language

console.log(person_exists) // native js

我看到了Cappuccino syntax, 他们说,如果不在浏览器中加以汇编,就可操作。

但是,当时我看到咖啡厅的yn子,必须首先汇编成 j。

因此,能否在贾瓦特证书顶建立一个新的语言/javascript syntax?

如果是的话,是否有关于如何做到这一点的辅导/手册?

最佳回答

Processing.js是用Javascript(译自译自,如我所知,不汇编成联合材料)解释的一种文字语言。 处理。 j 专门为在网页上制作图象而设计,因此可能不是你所需要的,而是在一个网站上有两种文字说明语言的例子。

(程序是一种单独的图形语言,首先在 Java环境中(以及其他实施),然后才构想Canvas要素,并根据Javascript进行另一项实施。)

似乎你想要的是 Java,我有自己的特点。 只有当你(或其他人)在 Java字顶上建立联合材料+专业口译时,才有可能这样做。 我不认为这样做是一件非常可行的事。 处理。 j 解决办法可能是一个好的中间点,如果你将自己的语言与实际的Javascript分开,即如果你的语言和经常的联合文件可以分开。

<script language="javascript">
  var person_exists = true; // native js
  interpret("animal"); // your language interpreter. Interpret function looks through the DOM for a script tag with the "myscript" language and the  animal  ID.
  console.log(person_exists) // native js
</script>
<script language="myscript" id="animal">
   Animal eats banana // your language
</script>

然而,我重新思考一下你在跳过“我知道,我会发展自己的语言”。 错误

Animal = {
   eats: function(fruit) {
       console.log( om nom nom nom   + fruit);
   }
};

var person_exists = true;
Animal.eats(banana);
console.log(person_exists);

例如:

问题回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签