Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

C言語のサンプルコードの実行機能対応 #70

Open
@saki7

Description

cpprefjpにはC++だけではなくC言語のコードスニペットもあるが、今はMarkdown上のinfo stringが cpp ではなく c になっているコードは検知から外れている(example がついていても検知から外れる)。

これに対応するためには、一見すると以下の1行を切り替えれば大丈夫なように思えるが、

if (lang === 'cpp') {

実際にはC++とC言語は別の言語なので、上の行の修正に追加で バックエンド(Wandbox)で使用するコンパイラを分けなければならない。そのための該当箇所は以下の通り。

kunai/js/kunai/wand.js

Lines 119 to 123 in 4ea3bbe

static defaults = new Map([
['compiler', 'clang-head'],
['options', ['warning', 'c++2a', 'cpp-pedantic-errors']],
['compiler-option-raw', ['-Wall', '-Wextra', /*'-Werror'*/]],
])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /