Skip to content

Commit 8f7fb33

Browse files
fix: add version number to wasm
fix ast-grep#605
1 parent ac10b6e commit 8f7fb33

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

website/src/components/Playground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import EnvDisplay from './EnvDisplay.vue'
1111
import { initializeParser, useAstGrep, Mode as ModeImport } from './astGrep'
1212
1313
// important initialization
14-
// await initializeParser()
14+
await initializeParser()
1515
1616
const {
1717
state,

website/src/components/SelectLang.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
<script lang="ts" setup>
22
import { languageDisplayNames } from './astGrep/lang'
33
import IconDown from './utils/IconDown.vue'
4+
import { versions } from '../../_data/parsers'
5+
import { computed } from 'vue';
46
5-
const lang = defineModel()
7+
const lang = defineModel<string>({
8+
required: true,
9+
})
10+
11+
const version = computed(() => {
12+
return versions[lang.value]
13+
})
614
</script>
715

816
<template>
917
<div class="selector">
18+
<span v-if="version" :title="`Parser version ${version}`">ⓘ </span>
1019
Language:
1120
<select v-model="lang">
1221
<option
@@ -39,4 +48,4 @@ select {
3948
display: none;
4049
}
4150
}
42-
</style>
51+
</style>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy